scrimba
The Vue Bootcamp
Vue router
Router File Structure
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Router File Structure
AboutCommentsNotes
Router File Structure
Expand for more info
index.js
run
preview
console
import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter);

const PageOne = { 'template': '<div>PageOne123</div>' };
const PageTwo = { 'template': '<div>My New Page Here</div>' };

const routes = [
{ path: '/page-one', component: PageOne },
{ path: '/new-page', component: PageTwo }
];

const router = new VueRouter({
routes
});

new Vue({
el: '#app',

router,

components: {

},

data: {
//
},
});
Console
"Download the Vue Devtools extension for a better development experience: https://github.com/vuejs/vue-devtools"
,
"You are running Vue in development mode. Make sure to turn on production mode when deploying for production. See more tips at https://vuejs.org/guide/deployment.html"
,
/index.html#/page-one
-5:40