Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 3
    For even more clueless newbies: VueRouter isn't included in VueJS core, so you may want to include the VueRouter separately: <script src="https://unpkg.com/vue-router"></script> Commented Sep 7, 2017 at 9:15
  • 2
    @Sabyasachi Edit your answer and add that information within the post itself. Commented Oct 24, 2017 at 20:29
  • 1
    new Vue({ router, ... }) is not valid syntax. Commented Jan 24, 2018 at 16:32
  • The script has partial ES6 usage which I think is making things worst for newcomers. Either go full ES6 with the proper variable decleration and arrow functions or use the traditional way. Commented Mar 1, 2018 at 16:28
  • @CrescentFresh new Vue({ router, ... }) is shorthand in ES6. In normal javascript is new Vue({ 'router': router, ... }) Commented Mar 1, 2018 at 16:29