Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install specific version of bootstrap using Angular CLI

Tags:

npm

I am trying to include bootstrap 3.7 in my angular 2 project by using Angular CLI command -

npm install bootstrap --save

I have requirement to use bootstrap 3.7 version. But, it is installing the latest version of bootstrap i..e bootstrap 4.

How to install specific version of bootstrap using Angular CLI?

like image 803
Guruling Kumbhar Avatar asked Jan 24 '18 17:01

Guruling Kumbhar


People also ask

How do I add bootstrap 5 to angular 13?

3+ Ways to Include Bootstrap 5 In Your Angular 13 ProjectImport the Bootstrap CSS file in the global styles. css file of your Angular project with an @import keyword. Add the Bootstrap CSS and JavaScript files in the styles and scripts arrays of the angular. json file of your project.

How do we install bootstrap in angular?

Adding bootstrap using the angular.Open the file and perform the following commands, node_modules/bootstrap/dist/css/bootstrap. css in the projects->architect->build->styles array, node_modules/bootstrap/dist/js/bootstrap. js in the projects->architect->build->scripts array, node_modules/bootstrap/dist/js/bootstrap.


2 Answers

From the official bootstrap documentation :

You can also install Bootstrap using npm:

npm install bootstrap@3 --save

like image 177
Rafik Tighilt Avatar answered Oct 09 '22 17:10

Rafik Tighilt


This is related to NPM, not angular. There are 2 ways:

  1. npm install bootstrap@version --save(replace version with the desired version). Using --save is a best pratice. It adds the bootstrap dependencies to package.json
  2. Check your package.json and update "bootstrap": "4.0.0" to 3.3.7
like image 31
TheUnreal Avatar answered Oct 09 '22 17:10

TheUnreal