I have tried to add styles dependency in angular.json
package but showing that the module not found. adding two of the bootstrap files.
here is the screenshot of both the files
the angular.json file is like this angular.json file
This question is related to
javascript
html
angular
angular-ui-bootstrap
using command
npm install bootstrap --save
open .angular.json old (.angular-cli.json ) file find the "styles" add the bootstrap css file
"styles": [
"src/styles.scss",
"node_modules/bootstrap/dist/css/bootstrap.min.css"
],
npm install bootstrap --save
and add relevent files into angular.json
file under the style
property for css files and under scripts
for JS files.
"styles": [
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
....
]
npm install --save bootstrap
afterwards, inside angular.json
(previously .angular-cli.json
) inside the project's root folder, find styles and add the bootstrap css file like this:
for angular 6
"styles": [
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
"styles.css"
],
for angular 7
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
],
Source: Stackoverflow.com