mirror of
https://github.com/exane/not-gwent-online
synced 2024-10-31 10:36:53 +00:00
fix routing
This commit is contained in:
parent
e20c5a0901
commit
7dbb617323
@ -1,26 +1,23 @@
|
|||||||
var Vue = require('vue');
|
var Vue = require('vue');
|
||||||
var router = require('./routes');
|
var VueRouter = require('vue-router');
|
||||||
|
|
||||||
require('../../../public/Config.js');
|
|
||||||
|
|
||||||
|
Vue.use(VueRouter)
|
||||||
Vue.use(require('vue-resource'));
|
Vue.use(require('vue-resource'));
|
||||||
Vue.http.headers.common['X-CSRF-TOKEN'] = $('.token').attr('content');
|
Vue.http.headers.common['X-CSRF-TOKEN'] = $('.token').attr('content');
|
||||||
|
|
||||||
var app = new Vue({
|
var app = Vue.extend({
|
||||||
|
|
||||||
el: 'body',
|
|
||||||
|
|
||||||
data: {
|
|
||||||
name: '',
|
|
||||||
view: '',
|
|
||||||
section: ''
|
|
||||||
},
|
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
inner: require('./components/inner'),
|
inner: require('./components/inner'),
|
||||||
landing: require('./components/landing')
|
landing: require('./components/landing')
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//router.init(app);
|
var routes = require('./routes');
|
||||||
|
var router = new VueRouter(routes.options);
|
||||||
|
|
||||||
|
router.map(routes.maps);
|
||||||
|
router.start(app, 'body');
|
||||||
|
|
||||||
|
new Vue({
|
||||||
|
el: 'body'
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user