-
-
Couldn't load subscription status.
- Fork 5k
Description
Simplify my scene:
I wrote two components, a login.vue and a main.vue, after click a button in login.vue ,it executes 'route.go('/main')', the router-view renderered the main.vue content, but, in the main.vue's ready method, 'router.app.$route.path' returns '/login', not '/main', I don't know other ways to get the right route path in 'ready' method after a router-view is changed
I use vue-router 0.4.0, and vue.js 0.12.10
is there a proper way to get the right path after change a route?
before I got the problem above, I use 'route.afterEach' method to capture the route change event, it's seems that this method is removed in vue-router 0.4.0
I find a way, use 'router._currentRoute.path' can read the right path in 'ready' method, but, I think it's not a good way