DEV Community

Bipon Biswas
Bipon Biswas

Posted on

How to Setup Angular Bootstrap

Step 1: start project npm start using this command into terminal. Use npm to use Bootstrap

npm install bootstrap --save

What this does. It does download bootstrap and store it into node modules folder. But this --save flag also add bootstrap as a dependency injection in package.json file.

Let me show you.

Alt Text

Now go to package.json file.

Alt Text

Step 2: Import bootstrap style.css file

@import "~bootstrap/dist/css/bootstrap.css"
Enter fullscreen mode Exit fullscreen mode

Now let's get back to our courses.component.ts file.

<h3>Bootstrap Button</h3>
<button class="btn btn-primary">Button</button>
Enter fullscreen mode Exit fullscreen mode

Output

Alt Text

Top comments (0)

Does your company have something to share with DEV?

Create an Organization and start sharing content with the community on DEV.