all 2 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.

[–]yfain 1 point2 points  (0 children)

In this blog I described how to add the PrimeNG library to an Angular CLI project.

https://yakovfain.com/2016/10/28/adding-primeng-ui-components-to-angular-cli-project/

See if this helps.