27. Migration from Vue Router 0.7.x

Migration from Vue Router 0.7.x

Only Vue Router 2 is compatible with Vue 2, so if you’re updating Vue, you’ll have to update Vue Router as well. That’s why we’ve included details on the migration path here in the main docs. For a complete guide on using the new Vue Router, see the Vue Router docs.

Router Initialization

router.start replaced

There is no longer a special API to initialize an app with Vue Router. That means instead of:

router.start({
  template: '<router-view></router-view>'
}, '#app')

You’ll just pass a router property to a Vue instance:

new Vue({
  el: '#app',
  router: router,
  temp