vue-app-router
v0.0.1
Published
Native like router for vue web app
Downloads
6
Readme
vue-app-router
Router for vue based mobile SPA.
Introduction
Like vue-router but vue-app-router puts all route views into a stack, like native, past route views would be kept.
Installation
npm install vue-router
Usage
HTML
<div id="app">
<router-views></router-views>
</div>
JavaScript
import Vue from 'vue';
import appRouter from 'vue-app-router';
const Foo = { template: '<div>foo</div>' };
const Bar = { template: '<div>bar</div>' };
const routes = {
{ path: '/foo', component: Foo },
{ path: '/bar', component: Bar }
};
Vue.use(appRouter, {
routes,
transition: 'slide'
});
new Vue({
el: '#app',
store
}).$mount('#app');