ibt2/src/main.js

34 lines
1,023 B
JavaScript
Raw Normal View History

2017-01-02 21:52:33 +01:00
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
2017-01-14 11:47:54 +01:00
import Vue from 'vue';
import VueRouter from 'vue-router';
import VueResource from 'vue-resource';
import VueMaterial from 'vue-material';
import 'vue-material/dist/vue-material.css';
import 'roboto-fontface/css/roboto/roboto-fontface.css';
import 'material-design-icons/iconfont/material-icons.css';
import jQuery from 'jquery';
import App from './App';
2017-01-15 19:07:10 +01:00
import User from './User';
import Toolbar from './Toolbar';
2017-01-02 21:52:33 +01:00
2017-01-14 11:47:54 +01:00
Vue.use(VueRouter);
2017-01-02 21:52:33 +01:00
Vue.use(VueResource);
2017-01-14 11:47:54 +01:00
Vue.use(VueMaterial);
2017-01-02 21:52:33 +01:00
2017-01-14 11:47:54 +01:00
var routes = [
2017-01-15 19:07:10 +01:00
{path: '/', component: App},
{path: '/day/', component: App},
{path: '/day/:day', component: App},
{path: '/user/:user', component: User}
2017-01-14 11:47:54 +01:00
];
const router = new VueRouter({routes});
var vue = new Vue({
el: '#app',
2017-01-15 19:07:10 +01:00
template: '<div id="app"><Toolbar /><router-view class="view"></router-view></div>',
2017-01-14 11:47:54 +01:00
router: router,
2017-01-15 19:07:10 +01:00
components: { App, Toolbar, User }
2017-01-14 11:47:54 +01:00
});