19 lines
514 B
JavaScript
19 lines
514 B
JavaScript
import {ng} from 'vendor';
|
|
import {NAME as SALIX} from './module';
|
|
|
|
export const bootstrap = () => {
|
|
const selector = 'selector'
|
|
|
|
let _script = document.currentScript || (() => {
|
|
let scripts = document.getElementsByTagName('script');
|
|
return scripts[scripts.length - 1];
|
|
})();
|
|
|
|
let _element = _script && document.querySelector(_script.getAttribute(selector));
|
|
if (!_element) {
|
|
throw new Error("element is not defined");
|
|
}
|
|
ng.bootstrap(_element, [SALIX]);
|
|
|
|
};
|