Add vue router
ayoubkhan558-zz opened this issue · 3 comments
ayoubkhan558-zz commented
Please add vue router in it
vedees commented
Ill post article later about it. but its easy. same way like vue-cli
vedees commented
vue-router:
- install
vue-router
:
npm install vue-router
- index.js will be:
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
- Main app.vue component will be:
<!-- route outlet -->
<!-- component matched by the route will render here -->
<router-view></router-view>
- Create nav:
<!-- use router-link component for navigation. -->
<!-- specify the link by passing the `to` prop. -->
<!-- `<router-link>` will be rendered as an `<a>` tag by default -->
<router-link to="/foo">Go to Foo</router-link>
<router-link to="/bar">Go to Bar</router-link>
Follow it: docs
vedees commented
Please add vue router in it
up