Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « issue_show « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d08e8ba0c4bf83bcbc9ea9a7cbd2b9d5a4884cdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Vue from 'vue';
import sanitize from 'sanitize-html';
import issuableApp from './components/app.vue';
import '../vue_shared/vue_resource_interceptor';

export default function initIssueableApp() {
  const initialDataEl = document.getElementById('js-issuable-app-initial-data');
  const props = JSON.parse(sanitize(initialDataEl.textContent).replace(/"/g, '"'));

  return new Vue({
    el: document.getElementById('js-issuable-app'),
    components: {
      issuableApp,
    },
    render(createElement) {
      return createElement('issuable-app', {
        props,
      });
    },
  });
}