Skip to content

Instantly share code, notes, and snippets.

@praneetloke
Created June 9, 2018 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save praneetloke/2d524bef1dda4d2e1fb8fc0f53289565 to your computer and use it in GitHub Desktop.
Save praneetloke/2d524bef1dda4d2e1fb8fc0f53289565 to your computer and use it in GitHub Desktop.
The default router created by the CLI
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