Easiest way to use bootstrap in Angular


Angularjs is a front end library for create beautiful interactive web application using Nodejs ( JavaScript). If you are familiar with Reactjs , may catch it faster.

bootstrap

To enable bootstrap for the angular project there are multiple ways. You can manually include the library by downloading it from the getBootstrap.com. I prefer the npm way as most developers does

  1. Install the bootstrap from npm repo
  2. import them in styles.css

Install bootstrap

npm install --save bootstrap

Styles.css

Styles.css can be found at the root of your src folder of the project. Import the bootstrap main.css enable it for all the component for your project.

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

You can import as many styles you need to include.

Keep reading Angular posts

Published by

Manoj

A developer,teacher and a blogger obsessed with Python,Dart and open source world from India

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.