Created
June 9, 2018 17:13
-
-
Save praneetloke/2d524bef1dda4d2e1fb8fc0f53289565 to your computer and use it in GitHub Desktop.
The default router created by the CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue'; | |
import Router from 'vue-router'; | |
import HelloWorld from '@/components/HelloWorld'; | |
Vue.use(Router); | |
export default new Router({ | |
routes: [ | |
{ | |
// this component is loaded when the site is loaded first. '/' represents the root-URL | |
path: '/', | |
// just a name for this particular route | |
name: 'HelloWorld', | |
// the actual component that would be loaded when the user navigates to the root-URL. i.e., loads the webpage | |
component: HelloWorld | |
}, | |
], | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment