Closed nulele closed 5 years ago
A little support please... :(
Replace this.$navigator
with Vue.prototype.$navigator
. You're not in a Vue context to be able to access it via this
Yes it works!!!! Thank you very much.
Maybe it would be appropriate to document a bit this specific case.
Hello,
I have a vuex store with a mutation function (login) that makes an axios call to the backend. When login is done I want to navigate to home:
This is my router:
And this is the main.js
everything works fine except when it comes to call
this.$navigator.navigate('/home', { clearHistory: true });
orthis.$navigator.navigate('/login', { clearHistory: true });
when I get "cannot read property navigate of undefined". Same error in logout function.Any idea?
Thanks