Install Bootstrap 4 in Angular 9 | How to Add Bootstrap in Angular 9

Install Bootstrap 4 in Angular 9 | How to Add Bootstrap in Angular 9

In this post we will give you information about Install Bootstrap 4 in Angular 9 | How to Add Bootstrap in Angular 9. Hear we will give you detail about Install Bootstrap 4 in Angular 9 | How to Add Bootstrap in Angular 9And how to use it also give you demo for it if it is necessary.

I am going to explain you example of how to install bootstrap in angular 9. we will help you to give example of how to add bootstrap 4 in angular 9. you can see how to use bootstrap in angular 9. you can understand a concept of angular 9 install bootstrap 4. You just need to some step to done angular 9 add bootstrap 4.

As we know Bootstrap is the world’s most popular framework for building responsive, and mobile-first sites. bootstrap provide several class for making responsive website for your mobile. So if you want to use bootstrap with angular 9 than i will help you very simple way.

I have a two install bootstrap and use it with your angular 9 project. i will give you both way example bellow.

You can easily create your angular app using bellow command:

ng new my-new-app

Example 1:

In this solution, you need to just install bootstrap on your angular 9 and import css file to style.css file. this is only for css importing. so you can run command bellow:

npm install bootstrap --save

Ok, now you need to import your bootstrap css on style.css file as like bellow:

src/style.css

@import "~bootstrap/dist/css/bootstrap.css";

Now you can use bootstrap class in your angular 9 app. It will works.

Example 2:

In this solution, we will also install bootstrap with jquery and popper js. so that way you can also import bootstrap css and bootstrap js function. So i think this will be best solution for you i think.

let’s run following commands:

npm install bootstrap --save

npm install jquery --save

npm install popper.js --save

Now after successfully run above command. let’s import it in angular.json file.

angular.json

....

"styles": [

"node_modules/bootstrap/dist/css/bootstrap.min.css",

"src/styles.css"

],

"scripts": [

"node_modules/jquery/dist/jquery.min.js",

"node_modules/bootstrap/dist/js/bootstrap.min.js"

]

.....

Now you can easily use bootstrap class as like bellow:

src/app/app.component.html

Also see:How to Create Component in Angular 9?

<div >

<h1>Install Bootstrap 4 in Angular 9 - ItSolutionStuff.com</h1>

<div >

<div >

Featured

</div>

<div >

<h5 >Special title treatment</h5>

<p >With supporting text below as a natural lead-in to additional content.</p>

<a href="#" >Go somewhere</a>

</div>

</div>

</div>

Now you can use bootstrap css and js both.

Now you can check your angular 9 project.

I hope it can help you…

Hope this code and post will helped you for implement Install Bootstrap 4 in Angular 9 | How to Add Bootstrap in Angular 9. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

Leave a Comment

Your email address will not be published. Required fields are marked *

3  +  3  =  

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US