Difference between revisions of "VueJs Routing"
Jump to navigation
Jump to search
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''CD into directory''' | '''CD into directory''' | ||
npm install --save vue-router | npm install --save vue-router | ||
** thoses .js files should be .vue | |||
Import Router into [[main.js File]]<br> | Import Router into [[main.js File]]<br> | ||
Routes are are stored in [[routes.js File]]<br> | Routes are are stored in [[routes.js File]]<br> | ||
Main [[app.vue File]] | Main [[app.vue File]] <br> | ||
Links created in the [[Header.js File]] <br> | |||
Create a Go to home button [[user.vue]] <br> | |||
Pass info with a link [[vuelinksnip]]<br> | |||
==Adding Subroutes == | |||
[[VueJs|Category]]/ [[Programming]] | [[VueJs|Category]]/ [[Programming]] | ||
Add sub routes in [[routes.js File]]<br> | |||
Edit [[user.vue]] to load the subroutes<br> |
Latest revision as of 17:19, 19 October 2018
CD into directory
npm install --save vue-router
- thoses .js files should be .vue
Import Router into main.js File
Routes are are stored in routes.js File
Main app.vue File
Links created in the Header.js File
Create a Go to home button user.vue
Pass info with a link vuelinksnip
Adding Subroutes
Category/ Programming
Add sub routes in routes.js File
Edit user.vue to load the subroutes