Useful or not, from you.
angular-cli Scripts not loading from angular.json file

Versions

Angular CLI: 6.0.3
Node: 8.9.4
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.6.3
@angular-devkit/core         0.6.3
@angular-devkit/schematics   0.6.3
@schematics/angular          0.6.3
@schematics/update           0.6.3
rxjs                         6.1.0
typescript                   2.7.2
Windows 10x64

Repro steps

I need to use admin-lte in my project

  • Step 1: I added it via terminal using npm install admin-lte --save
  • Step 2: I added jquery via terminal using following: npm install --save jquery npm install --save-dev @types/jquery
  • Step 3: I added all the necessary .css and .js files in the angular.json file including first script reference of jquery from nod_modules

"scripts": [ "node_modules/jquery/dist/jquery.js", "node_modules/admin-lte/plugins/bootstrap/js/bootstrap.min.js", "node_modules/admin-lte/plugins/fastclick/fastclick.js", "node_modules/admin-lte/dist/js/adminlte.min.js", "node_modules/admin-lte/plugins/slimscroll/jquery.slimscroll.min.js", "node_modules/admin-lte/plugins/select2/select2.full.min.js", "node_modules/ion-rangeslider/js/ion.rangeSlider.min.js", "node_modules/alertifyjs/build/alertify.min.js", "node_modules/datatables.net/js/jquery.dataTables.js" ]

Observed behavior

jquery and other js files are not loading

Desired behavior

I have used a collapsable panel from the admin-lte template and it should toggle

Note that other javascript files like ion slider , alertify and jquery.dataTables are working.

That's a useful answer
Without any help

use this syntax: "./node_modules/jquery/dist/jquery.js" instead of "node_modules/jquery/dist/jquery.js"