mtinfo/app/js/main.js

21 lines
359 B
JavaScript
Raw Normal View History

2020-12-02 16:07:17 +01:00
const router = new VueRouter({
routes: [{
path: "/",
component: { template: `<start-page/>` }
},{
2020-12-02 17:34:11 +01:00
path: "/nodes",
component: { template: `<node-list/>` }
},{
path: "/nodes/:name",
2020-12-02 16:07:17 +01:00
component: { template: `<node-info v-bind:name="$route.params.name"/>` }
}]
});
new Vue({
el: "#app",
router: router
});
console.log("OK");