install bootstrap angular
To install Bootstrap in an Angular project, you can follow these steps:
- Open your Angular project in a terminal or command prompt.
- Run the following command to install Bootstrap using npm:
npm install bootstrap
- Once the installation is complete, open the
angular.json
file in the root directory of your project. - Locate the
styles
array within thearchitect > build
section. - Add the Bootstrap CSS file to the array. The file path will depend on your project's directory structure, but it is usually
node_modules/bootstrap/dist/css/bootstrap.min.css
. Here's an example of how thestyles
array might look:
"styles": [
"src/styles.css",
"node_modules/bootstrap/dist/css/bootstrap.min.css"
]
- Save the
angular.json
file. - You can now use Bootstrap classes and components in your Angular project.
That's it! Bootstrap should now be installed and ready to use in your Angular project.