How to use bootstrap 4 in angular 2? Last Updated : 28 Apr, 2020 Comments Improve Suggest changes Like Article Like Report Bootstrap is an open-source toolkit for developing with HTML, CSS, and JS. The Bootstrap framework can be used together with modern JavaScript web & mobile frameworks like Angular. Bootstrap 4 is the newest version of Bootstrap, which is the most popular HTML, CSS, and JavaScript framework. This article is a step by step guide to using Bootstrap 4 with Angular 2. Follow the below steps to use the Bootstrap 4 in Angular 2: Before following the steps you have to make sure that you already installed Angular CLI, if it was not installed then run the below command to install the Angular CLI. After installing the Angular CLI you can follow the below steps. npm install -g @angular/cli Step 1: Create a new project by running the below command in the terminal. ng new project-name Step 2: Here need to install the Bootstrap. Now open the project in the terminal and run the following command on Angular 2 CLI to add bootstrap to your project. npm i bootstrap@next --save Step 3: Now have to importing CSS, go to src/style.css and import bootstrap @import "../node_modules/bootstrap/dist/css/bootstrap.min.css"; Step 4: For Bootstrap JS components to work you will still need to import bootstrap.js into angular.json/angular-cli.json under scripts. This should happen automatically, its still better to check. "scripts": ["../node_modules/jquery/dist/jquery.js", "../node_modules/tether/dist/js/tether.js", "../node_modules/bootstrap/dist/js/bootstrap.js"], Step 5: Now have to restart the server.ng serve Step 6: Now you have to run app.component.html code. html <!DOCTYPE html> <html> <head> <title> </title> </head> <body> <nav class="navbar navbar-light bg-light"> <a class="navbar-brand" href="#"> <img src="/docs/4.0/assets/brand/bootstrap-solid.svg" width="30" height="30" class="d-inline-block align-top" alt=""> Bootstrap </a> <form class="form-inline"> <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search"> <button class="btn btn-outline-success my-2 my-sm-0" type="submit"> Search </button> </form> </nav> <div class="container"> <div class="jumbotron"> <h1> <i class="fa fa-camera-retro"></i> Welcome to Geeks for Geeks </h1> <p>A Computer Science portal for geeks.</p> </div> </div> </body> </html> Output: Comment More infoAdvertise with us S SonaliPatel Follow Improve Article Tags : Web Technologies Bootstrap AngularJS-Misc Bootstrap-4 Similar Reads How To Use Bootstrap Icons In Angular? The most popular framework for making responsive and mobile-friendly websites is called Bootstrap. They include forms, typography, buttons, tables, navigation, modals, and picture carousels etc.These are built using CSS and HTML. It also supports plugins written in JavaScript. It provides the proces 3 min read How to Install Bootstrap in Angular? If you have completed your practice in the field of HTML & CSS and want to develop more interesting and attractive webpages in the future, moving ahead for the Bootstrap topic along with the Angular concept will be appropriate for you. However, to have Bootstrap on your Angular Project you shoul 5 min read How to open popup using Angular and Bootstrap ? Adding Bootstrap to your Angular application is an easy process. Just write the following command in your Angular CLI. It will add bootstrap into your node_modules folder. ng add @ng-bootstrap/ng-bootstrap Approach: Import NgbModal module in the TypeScript file of the corresponding component, and th 2 min read How to make Tabs using Angular UI Bootstrap ? In this article we will see how to make Tabs using Angular UI bootstrap. Angular UI Bootstrap is an Angular JS framework created by Angular UI developers for providing better UI which can be used easily. Download AngularUI from the link: https://angular-ui.github.io/bootstrap Approach: First, add An 2 min read How to make a Bootstrap Modal Popup in Angular 9/8 ? In this article, we will see how to use the modal popup component of bootstrap in the Angular application. The addition of bootstrap in our Angular project is an easy process. The modal dialog box can be used to restrict the user to perform particular actions before they return to their normal use o 3 min read Like