debian-mirror-gitlab/app/assets/javascripts/issue_show/index.js

21 lines
564 B
JavaScript
Raw Normal View History

2017-08-17 22:00:37 +05:30
import Vue from 'vue';
2017-09-10 17:25:29 +05:30
import issuableApp from './components/app.vue';
2017-08-17 22:00:37 +05:30
import '../vue_shared/vue_resource_interceptor';
2017-09-10 17:25:29 +05:30
document.addEventListener('DOMContentLoaded', () => {
const initialDataEl = document.getElementById('js-issuable-app-initial-data');
2018-03-17 18:26:18 +05:30
const props = JSON.parse(initialDataEl.innerHTML.replace(/"/g, '"'));
2017-08-17 22:00:37 +05:30
2017-09-10 17:25:29 +05:30
return new Vue({
el: document.getElementById('js-issuable-app'),
components: {
issuableApp,
},
render(createElement) {
return createElement('issuable-app', {
2018-03-17 18:26:18 +05:30
props,
2017-09-10 17:25:29 +05:30
});
},
});
});