0

Good morning,

I'm a WEB Developer trainee and I'm at 5 months of training. I have to install Bootstrap in a web interface project created with Angular. Project that will run locally, on a server and therefore no connection to the internet and no use of CDN (content delivery network). I use npm and I installed Bootstrap 4.4.1, it appears in the file "package.json" and I completed the file "angular.json" at the "style" level.

Translated with www.DeepL.com/Translator (free version), because I'm French and like many of my compatriots, my accent is... Anyway... :)

Thommy
  • 1
  • 2
    Does this answer your question? [How to add bootstrap to an angular-cli project](https://stackoverflow.com/questions/37649164/how-to-add-bootstrap-to-an-angular-cli-project) – R. Richards Jan 20 '20 at 14:32
  • 1
    there is this guide in the oficial github https://github.com/angular/angular-cli/wiki/stories-include-bootstrap – Eduardo Vargas Jan 20 '20 at 16:42
  • Hi, First of all, thank you for your quick answers. From your posts, it seems that I understood the principle and your procedures well, corresponding to everything I have seen, read and done. I think I'm on the right track. There must be some detail, maybe just a point or a version of the package that i is not the right one. I'll look into it. But thanks again for your answers, it's very nice! Translated with www.DeepL.com/Translator (free version) – Thommy Jan 23 '20 at 07:41

3 Answers3

0

you can install bootstrap in angular using npm install bootstrap command.

you can read a full blog about how to install & setup bootstrap in angular, here click to full blog about this

Bhavesh Ajani
  • 991
  • 9
  • 11
0

Try adding this in your css file (after installing bootstrap via npm i bootstrap) Dont forget ~ before bootstrap.

@import "~bootstrap/dist/css/bootstrap.min.css";
kiranvj
  • 32,342
  • 7
  • 71
  • 76
0
  1. use This command line: ng add @ng-bootstrap/ng-bootstrap

  2. Check in your package.jSon in the dependencies section if the 'bootstrap' appears. So you can use bootstrap in your project.

  3. Con't forget to restart your server with ng serve command this way works well for me. package.json Exemple

Barry
  • 1
  • 2