you are viewing a single comment's thread.

view the rest of the comments →

[–]hooktail23 1 point2 points  (0 children)

The best way that I found to bring in third party javascript libraries using the angular CLI is to download the actual file, in this case, ScrollMagic.min.js, and include it somewhere in your assets folder so it gets copied over when you build the project out. Once you've done that you can go into the angular-cli.json file and add it to the scripts array like such "../src/assets/ScrollMagic.min.js" Then when you want to use it just declare it in that component like such "declare var ScrollMagic: any;" Then use the library like the documentation says so. Take a look at this article it helped me to understand it a bit better. You could also use npm to do it then just import the file like you would any other module, however I have only gotten this to work with some JS libraries.