Skip to main content

Posts

Showing posts from December, 2022

How to add bootstrap into Angular 9 Project

To add Bootstrap to an Angular 9 project, you will need to follow a few steps: Install the Bootstrap package: In your terminal, navigate to your Angular project's root directory and run the following command: npm install bootstrap Add the Bootstrap CSS file to the angular.json file: In the "styles" array, add the path to the Bootstrap CSS file, like this: "styles": [ "node_modules/bootstrap/dist/css/bootstrap.min.css", "src/styles.css" ], Import Bootstrap in your global styles file: In your global styles file, usually styles.scss, you can import Bootstrap by adding @import '~bootstrap/scss/bootstrap'; Import Jquery and popper.js: Bootstrap uses Jquery and popper.js as a dependency. So you need to install them first. npm install jquery popper.js Add Jquery and popper.js to the scripts array in the angular.json file: In the "scripts" array, add t