Angular – Add Bootstrap to your application

Bootstrap components / styles installation

In the root of your angular project open package.json file and add new dependency for Bootstrap and font-awesome.

Update installed dependencies with npm :

Add new directive for styles in .angular-cli.json configuration

After you build your angular application, new webpack prepared application will contain bootstrap components and font.

Start using bootstrap

Simply use bootstrap class directives in your templates, partial template code:

And the result of the example :

 

 

Leave a Reply

Your email address will not be published.