If external library like jQuery
is installed using NPM
npm install --save jquery
Add script path into your angular-cli.json
"scripts": [
"../node_modules/jquery/dist/jquery.js"
]
You can also save the library file in your assets/js
directory and include the same in angular-cli.json
"scripts": [
"assets/js/jquery.js"
]
Save your main library jquery
and their dependencies like jquery-cycle-plugin
into the assets directory and add both of them into angular-cli.json
, make sure the order is maintained for the dependencies.