I have been attempting to integrate Bootstrap into my Angular project.
- Firstly, I used
npm install --save bootstrap
to add Bootstrap to my project. - Following that, I installed jQuery as well.
- I then specified the path for Bootstrap.
Displayed below is an excerpt from the angular.json file:
"styles": [
"../node_modules/boostrap/dist/css/bootstrap.css",
"src/styles.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js"
]
Although I have successfully implemented the Bootstrap path in the style.css file, I aim to achieve the same result by specifying the path in angular.json.
In my style.css file:
@import "../node_modules/bootstrap/dist/css/bootstrap.css"
Here are the various paths I have tested:
"./node_modules/boostrap/dist/css/bootstrap.css"
"node_modules/boostrap/dist/css/bootstrap.css"
"../node_modules/boostrap/dist/css/bootstrap.css"