javascript - Angular4 for create UI plugin -
i want create gallery plugin. want use angular 4 or reactjs. i'm testing angular 4. plugin should callable pure js e.g. lazy initialization (e.g. after clicking on custom button).
how can open modal or embed gallery in html js?
maybe angular 4 not solution these kind of plugins?
currently html looks like:
<div id="my-app">here gallery</div> <script type="text/javascript"> settimeout(function() { document.getelementbyid('my-app').innerhtml = '<app></app>'; gallery(); }, 5000); </script>
where gallery function created during compilation process:
export function main(): promise<any> { return platformbrowser() .bootstrapmodulefactory(appmodulengfactory) .then(decoratemoduleref) .catch((err) => console.error(err)); } // declare global initialization function lazy initialize (<any>window).gallery = main;
Comments
Post a Comment