diff --git a/site/client/app/app.js b/site/client/app/app.js index 0298c43..fba70ea 100644 --- a/site/client/app/app.js +++ b/site/client/app/app.js @@ -1,26 +1,23 @@ var Vue = require('vue'); -var router = require('./routes'); - -require('../../../public/Config.js'); +var VueRouter = require('vue-router'); +Vue.use(VueRouter) Vue.use(require('vue-resource')); Vue.http.headers.common['X-CSRF-TOKEN'] = $('.token').attr('content'); -var app = new Vue({ - - el: 'body', - - data: { - name: '', - view: '', - section: '' - }, - +var app = Vue.extend({ components: { inner: require('./components/inner'), landing: require('./components/landing') } - }); -//router.init(app); \ No newline at end of file +var routes = require('./routes'); +var router = new VueRouter(routes.options); + +router.map(routes.maps); +router.start(app, 'body'); + +new Vue({ + el: 'body' +}); \ No newline at end of file