1npm install bootstrap
2npm install jquery
3
4
5Add this to angular.json
6
7"styles": [
8 "node_modules/bootstrap/dist/css/bootstrap.css",
9 "src/styles.css"
10 ],
11 "scripts": [
12 "node_modules/bootstrap/dist/js/bootstrap.js",
13 "node_modules/jquery/dist/jquery.js"
14 ]
1# From project directory:
2npm install --save bootstrap
3npm install --save jquery
4
5# Now edit `angular.json`
6# Position: `projects -> architect -> build -> options`
7# To `styles`, add "node_modules/bootstrap/dist/css/bootstrap.css"
8# To `scripts`,
9# add "node_modules/jquery/dist/jquery.js"
10# and also "node_modules/bootstrap/dist/js/bootstrap.js"
11# Test with
12# <<div class="alert alert-primary" role="alert"> Bootstrap alert</div>
1From angular cli:
2
3npm install --save bootstrap
4npm install --save jquery
5
6Then add the following paths to angular.json:
7
8"node_modules/bootstrap/dist/css/bootstrap.css" in the projects -> architect -> build -> styles array
9"node_modules/jquery/dist/jquery.js" in the projects -> architect -> build -> scripts array
10"node_modules/bootstrap/dist/js/bootstrap.js" in the projects -> architect -> build -> scripts array
11
1@import "~bootstrap/dist/css/bootstrap.css"
2
3 "styles": [
4 "./node_modules/bootstrap/dist/css/bootstrap.css",
5 "src/styles.css"
6 ],
1"styles": [
2 "node_modules/bootstrap/dist/css/bootstrap.min.css",
3 "styles.scss"
4]
5