https://github.com/ocombe/ocLazyLoad
I have used this for Angular 1, is there any alternative plugins like this to work for Angular 2? I want to include the 3rd party Javascript plugins on demand (lazy-load), into my Angular 2 project. So far no success.
I'm currently working on Angular CLI. I have tried to include in angular-cli.json
file, including jquery seems work. But I think this is for global load.
"styles": [
"styles.css",
"../node_modules/bootstrap/dist/css/bootstrap.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.js"
],
Let's say I want a page with WOW.js
plugin in that page. I should call a component with WOW.js initiated inside it, then the WOW.js
file will be included dynamically. How to do that?
Thanks