2017-04-06 01:13:06 +00:00
|
|
|
import Vue from 'vue';
|
2017-05-10 11:29:33 +00:00
|
|
|
import issuableApp from './components/app.vue';
|
2017-04-06 01:13:06 +00:00
|
|
|
import '../vue_shared/vue_resource_interceptor';
|
|
|
|
|
2017-05-12 09:11:15 +00:00
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
2017-05-15 13:51:40 +00:00
|
|
|
const initialDataEl = document.getElementById('js-issuable-app-initial-data');
|
2017-12-07 17:52:32 +00:00
|
|
|
const props = JSON.parse(initialDataEl.innerHTML.replace(/"/g, '"'));
|
2017-05-18 12:24:34 +00:00
|
|
|
|
2017-05-12 09:11:15 +00:00
|
|
|
return new Vue({
|
|
|
|
el: document.getElementById('js-issuable-app'),
|
|
|
|
components: {
|
|
|
|
issuableApp,
|
|
|
|
},
|
|
|
|
render(createElement) {
|
|
|
|
return createElement('issuable-app', {
|
2017-12-07 17:52:32 +00:00
|
|
|
props,
|
2017-05-12 09:11:15 +00:00
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|