install bootstrap in angular code example
Example 1: install angular bootstrap
# From project directory:
npm install --save bootstrap
npm install --save jquery
# Now edit `angular.json`
# Position: `projects -> architect -> build -> options`
# To `styles`, add "node_modules/bootstrap/dist/css/bootstrap.css"
# To `scripts`,
# add "node_modules/jquery/dist/jquery.js"
# and also "node_modules/bootstrap/dist/js/bootstrap.js"
# Test with
# < Bootstrap alert
Example 2: how to add bootstrap in angular
@import "~bootstrap/dist/css/bootstrap.css"
"styles": [
"./node_modules/bootstrap/dist/css/bootstrap.css",
"src/styles.css"
],
Example 3: installing bootstrap in angular 9
ng add @ng-bootstrap/ng-bootstrap
Example 4: install bootstrap angular 9
From angular cli:
npm install --save bootstrap
npm install --save jquery
Then add the following paths to angular.json:
"node_modules/bootstrap/dist/css/bootstrap.css" in the projects -> architect -> build -> styles array
"node_modules/jquery/dist/jquery.js" in the projects -> architect -> build -> scripts array
"node_modules/bootstrap/dist/js/bootstrap.js" in the projects -> architect -> build -> scripts array
Example 5: install bootstrap in angular
$ npm install jquery
Example 6: install bootstrap in angular
$ npm install bootstrap