1

I have created a angular 5 project, and I want to integrate Bootstrap 5 on it to be able to customise it using the scss files.

I've created the project using the angular-cli command line:

ng new sample-app
cd sample-app

Then I have added bootstrap 4 dependency to my project:

npm install --save bootstrap@4.1.1

I've set the default.StylesExt property to scss:

ng set defaults.styleExt=scss

I also renamed the extensions of the css files to scss too in order to be recognised by the compiler.

Does anybody know what else should I do in order to get the bootstrap files loaded? or bootstrapped in my app?

Thank you so much in advance.

vhbazan
  • 1,240
  • 1
  • 17
  • 26

1 Answers1

1

You simply need to tell angular CLI to add the css file.

In the angular CLI JSON file, just add:

"styles": [
  "../node_modules/bootstrap/dist/css/bootstrap.min.css",
  "styles.scss"
]
user184994
  • 17,791
  • 1
  • 46
  • 52