March 2018
Beginner to intermediate
344 pages
7h 7m
English
Each time we create a new .vue file inside the pages directory, we're given a new route for our application. This means that any time we want to create a new route, we just create a new folder with the route name and the rest is handled by Nuxt. Given that we have default index.vue in our pages folder, the routes initially look like this:
routes: [ { name: 'index', path: '/', component: 'pages/index.vue' }]
If we then add a categories folder with an index.vue inside, Nuxt would generate the following routes:
routes: [ { name: 'index', path: '/', component: 'pages/index.vue' }, { name: 'categories', path: '/categories', component: 'pages/categories/index.vue' }]
If we want to take advantage of dynamic route parameters, such as an ...
Read now
Unlock full access