3 ms·
I tried to use Vue 2 for a pet project but couldn't get the routing to work. It seems the router was lagging behind in versions and there were no guides on "rou
by sergiotapia 10y ago
I tried to use Vue 2 for a pet project but couldn't get the routing to work. It seems the router was lagging behind in versions and there were no guides on "router 2.0".
Does this version have a routing guide and production ready routing solution? That's pretty important.
- um_ya 10y agoTook less than two seconds to google. https://github.com/vuejs/vue-router https://github.com/vuejs/vue-router
- bdcravens 10y agoThis is the project they were referring to by "2.0". And your two seconds of googling found a Github URL with no documentation, which is what the commenter was lamenting. http://router.vuejs.org/en/ http://router.vuejs.org/en/ does appear to be fairly complete however. (linked from the README)
- dimgl 10y agoWe're using Vue and its router in production since 1.x, so I'm not sure where you got that impression...
- thewhitetulip 10y agoI would like to know more about your use of Vue and the router in production. Tips/best case guidelines?
- dimgl 10y agoIf you have a relatively large app and having URLs makes sense, the router is a no brainer. No real tips; the vue-router documentation is excellent. If you're coming from Vue 1, the only thing that did confuse me is that the router hooks have changed. The router now listens on `beforeRouteEnter` and `beforeRouteLeave` and these hooks only get triggered once per route change. Therefore, to listen to query changes on a route you need to watch the `$route` object.