How to add Bootstrap to the Angular Project
In simple steps how to add bootstrap to the angular project.Here we are using MAC OS
- First install Node Js Download .
- Check installed version of node and npm using node -v and npm -v
3. Install Angular-CLI using the command sudo npm install -g @angular/cli and check the installed version using ng version command.
4. Create a new angular application using ng new sample. After this command you will see below files are creating it will take few minutes.
5. Install bootstrap by using command npm install bootstrap
6. After installation import the css and js path of bootstrap in the angular.json file.
7. Import the bootstrap path @import ‘~bootstrap/dist/css/bootstrap.min.css’; in the styles.scss file
8. To test weather bootstrap is working, take a sample bootstrap button and check in UI http://localhost:4200/ <button type="button" class="btn btn-primary">Primary</button>
Hurray! Done successfully added the bootstrap to the Angular Application.