Angular not loading bootstrap

32 Views Asked by At

I am fairly new to Angular, and trying to implement bootstrap to a project. But I am not able load bootstrap to my project

when i am looking in inspect tool --> Sources --> CSS

/* src/styles.css */ /* angular:styles/global:styles */ /*# sourceMappingURL=styles.css.map */

I have added the bootstrap package through NPM, and are able to find it in my node_modules, I have linked it in my angular.json

"styles": [ "node_modules/bootstrap/dist/css/bootstrap.min.css", "src/styles.css" ],

What am i doing wrong? I have followed this https://www.youtube.com/watch?v=bq9mvcuAmcQ

1

There are 1 best solutions below

0
Stephen Rosslan On

Seems like you've followed the correct steps. Double-check if the path in angular.json under styles matches the actual location of Bootstrap's CSS file in node_modules. Also, ensure you've saved changes and restarted your Angular development server (ng serve) after adding the Bootstrap path. If it still doesn't work, try deleting the node_modules folder and package-lock.json file, then run npm install to reinstall your packages. This might resolve any path or dependency issues.