everyone. Hope you are having a good day.
I've started an Angular project from scratch, I've installed all the packages I need through npm
. I've decided to use bootstrap
and I've found it has to be coupled with jquery
to work properly. I need to do some collapsible menus.
I used npm i --save bootstrap
and npm i --save jquery
to install both libraries. Both show up in the package.json
and package-lock.json
files but none of them appear in the node_modules folder.
I have both added in the angular.json
file as follows:
[...]
"styles": [
"src/styles.css",
"node_modules/bootstrap/dist/css/bootstrap.css"
],
"scripts": [
"node_modules/jquery/dist/jquery.js",
"node_modules/bootstrap/dist/js/bootstrap.js"
]
[...]
The bootstrap
library works fine (for some reason) but the jquery
doesn't, thus things are not collapsible. I tried to change that jquery
reference route in the file and searched through the node_modules
folder hoping to find any reference to the plugin but no luck so far. The Chrome console doesn't throw any error whatsoever, so I understand everything should work fine but it doesn't.
What can I do to make jquery
work properly?