I tried many other answers and the answer from @Gajanan was the one that worked for me. I answer this for the me of the future or other people that might encounter this problem, it is actually very simple and it might be explained in the Boostrap documentation or the Angular documentation and this is a tl;dr.
This is the process I used:
- I started a new Angular project from the cli, using scss and TypeScript.
- Then downloaded Bootstrap using NPM.
- Then added the Bootstrap
.scss file to the default styles scss.
After this my monke brain thought everything was right, because the Bootstrap styles loaded fine. But then I tried to use the modal, and it didn't work so I used the @Gajanan response and it worked.
But to that I have to add. Be careful where you add the script, I added the script elsewhere and I threw like 15 minutes to the garbage.
{
...
"projects": {
...
"myProject": {
...
"architect": {
...
"build": {
...
"options": {
...
"scripts": ["here 🎉"],
},
...
"test": {
...
"options": {
...
"scripts": ["NOT here"],
}
}
}
}
}
}
}
I know... I know... pretty obvious, but I had that problem, so this is a way of punishing myself for committing that error.
angular.jsonnpm i bootstrap