2016-11-04 10:32:27 +00:00
|
|
|
import {ng} from 'vendor';
|
2016-11-30 13:12:48 +00:00
|
|
|
import {NAME as SALIX} from './module';
|
2016-10-05 05:55:53 +00:00
|
|
|
|
|
|
|
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");
|
|
|
|
}
|
2016-11-30 13:12:48 +00:00
|
|
|
ng.bootstrap(_element, [SALIX]);
|
|
|
|
|
2016-11-11 11:04:50 +00:00
|
|
|
};
|