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