3

How Twitter Bootstrap library is intended to use with Angular 2 framework? Basically I can think of two different ways

  • Write the html using Bootstrap containers and nest Angular components inside those containers, keeping Angular agnostic of the layout
  • Instruct Angular 2 to use Bootstrap as a stylesheet and build the template using Bootstrap containers

Which is easier, more refactorable and efficient way?

Graham
  • 7,431
  • 18
  • 59
  • 84
Tuomas Toivonen
  • 21,690
  • 47
  • 129
  • 225

1 Answers1

0

You can integrate Bootstrap.css with Angular2 without no complications, there are many options for that (with CDN, manual import, with npm install ...), the problem here is that you also need to import Bootstrap.js and JQuery to make full use of the bootstrap framework.

You are working on a JS framework so you shold not depend on external JS libreries that can mess with your DOM management. Using ng-bootstrap you have components that angular can work with ( no need to import Bootstrap.js and JQuery), it is desing for angular.

Here is a link if you want to integrate them: angular2/5 with Bootstrap and ng-bootstrap integration

UHDante
  • 577
  • 9
  • 21