Solution 1 (with Bootstrap installed)
All you need to do is:
-
Go to .angular-cli.json under the root directory of your angular app.
-
Modify the styles array to include bootstrap before styles.css
"styles": [
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
"styles.css"
],
Note: the path to bootstrap is relative to /src/index.html
that’s why you need "../"
before node_modules
.
- Exit the current session of ng serve and start it again.
Here is an Awesome tutorial
Solution 2 (with Bootstrap referenced)
All you need to do is:
-
Go to styles.css under the root directory of your angular app.
-
Add this line at the top:
@import url('https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css');
Here is Angular docs