$route(to, from) inside watch is not working in ie

Viewed 98

The below $route(to, from) is not working in ie-11 browser in vuejs...

watch: {
     $route(to, from) {
      console.log(to.query.text, "Query text");
     }
    }

Basically I want access the route/url parameters inside watch. It is working all the browser except ie-11

TIA..

2 Answers

You cannot use watch on $route

Check out Navigation Guards if you want to execute code when the route changes.

You need to install and import babel-polyfill in your Vue app in order to fix most of vueJs issues in IE. Polyfill is used to provide modern functionality on browsers like IE.

Related