You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would really be helpful to have access to all the routes from the $navigator object. Right now we can only access the current route.
This would be helpful, for example, if I want to define a default transition for each route in the meta object. Then when I call this.$navigator.navigate I can pass in the default transition for the route.
methods: {
/***
* Called when a user taps a navigation button.
* @param string to Page ID from the routes.js file.
***/
route(to) {
let transition = 'fade';
const route = this.$navigator.getRoute(to); // getRoute is a possible new method to access the routes.
if (route && 'transition' in route.meta) {
transition = route.meta.transition;
}
this.$navigator.navigate(to, { frame: "mainContent", transition });
},
}
The text was updated successfully, but these errors were encountered:
That's certainly an option. As a workaround I also assigned it to Vue, i.e. Vue.prototype.$routes = routes. But a logical place for it is with the Navigator.
It would really be helpful to have access to all the routes from the
$navigator
object. Right now we can only access the current route.This would be helpful, for example, if I want to define a default transition for each route in the meta object. Then when I call
this.$navigator.navigate
I can pass in the default transition for the route.routes.js example:
Then in a component used for routing:
The text was updated successfully, but these errors were encountered: