Reputation: 81
I'm working with angular 6 and sass bootstrap project and i'm trying to add jquery, popper and js in angular.json
My code in angular.json is :
"styles": [
"src/styles.scss"
],
"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/popper.js/dist/popper.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js"
]
i have tried this also :
"styles": [
"src/styles.scss"
],
"scripts": [
"./node_modules/jquery/dist/jquery.js",
"./node_modules/popper.js/dist/popper.js",
"./node_modules/bootstrap/dist/js/bootstrap.js"
]
but toggle and dropdown dosnt work for me .
Upvotes: 0
Views: 1434
Reputation: 1161
npm install bootstrap to install boostrp
npm install jquery to install jquery and add path under the 'build' inside
angular.json
"styles": [
"src/styles.css", "node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": ["node_modules/bootstrap/js/jquery.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js"]
Please verify the file inside the node_modules.
Upvotes: 1