Skip to content

Instantly share code, notes, and snippets.

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 vladimirlukyanov/c2266d567d0199932b349cc4d17b116e to your computer and use it in GitHub Desktop.
Save vladimirlukyanov/c2266d567d0199932b349cc4d17b116e to your computer and use it in GitHub Desktop.
Nuxt.js programactically add route
const { resolve } = require('path');
module.exports = function() {
this.extendRoutes(routes => {
routes.push({
name: 'admin',
path: '/admin',
component: resolve('./pages/index.vue')
})
})
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment