angular add bootstrap

To add Bootstrap to an Angular project, follow these steps:

  1. Install Bootstrap using npm by running the following command in your terminal: npm install bootstrap

  2. Open the angular.json file in your project's root directory.

  3. Locate the "styles" array inside the build and test options.

  4. Add the path to the Bootstrap CSS file to the "styles" array. The path should be relative to the node_modules directory. For example: json "styles": [ "node_modules/bootstrap/dist/css/bootstrap.min.css", "src/styles.css" ],

  5. Save the angular.json file.

  6. If you want to use Bootstrap JavaScript components, you can also add the Bootstrap JavaScript file to the "scripts" array in the angular.json file. For example: json "scripts": [ "node_modules/bootstrap/dist/js/bootstrap.min.js" ],

That's it! Now you have successfully added Bootstrap to your Angular project. You can start using Bootstrap classes and components in your Angular templates.