how to add bootstrap in angular
To add Bootstrap in Angular, you can follow these steps:
Install Bootstrap by running the following command in your Angular project's root directory:
npm install bootstrap
Open the
angular.json
file in your project.In the
styles
array, add the path to the Bootstrap CSS file. This is typically located in thenode_modules
folder. For example:"styles": [ "src/styles.css", "node_modules/bootstrap/dist/css/bootstrap.min.css" ]
In the
scripts
array, add the path to the Bootstrap JavaScript file. This is also typically located in thenode_modules
folder. For example:"scripts": [ "node_modules/bootstrap/dist/js/bootstrap.min.js" ]
Save the
angular.json
file.
Bootstrap is now added to your Angular project. You can start using Bootstrap classes and components in your HTML templates.