I am trying to use bootstrap 4.6 on angular 11, I have done following steps.
It was installed and listed under the package as "bootstrap": "^4.6.0"
Listed bootstrap inside angular.json
under styles
:
"styles": [ "node_modules/bootstrap/dist/css/bootstrap.css", "src/styles.css" ],
Still its not loading bootstrap
Tried changing directory as in ./node_modules
or ../node_modules
or node_modules
nothing works.
used import bootstrap in style file it works fine but why its not working when I declared it in angular.json
.
Please let me know what I do wrong.
You can define different named build configurations on your angular.json, are you including the "styles" inside "build" and "serve" sections? Also can you see the physical css file on your filesystem?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.