I am planning to use Bootstrap 4 with angular 4 in my project, but I am confused between npm install --save @ng-bootstrap/ng-bootstrap
and npm install ngx-bootstrap --save
. So can anyone help me which is better for angular 4?

- 21,581
- 10
- 69
- 79

- 470
- 1
- 4
- 17
-
https://ng-bootstrap.github.io/#/getting-started – Dinesh Kumar Nov 04 '17 at 08:59
-
check this [question](https://stackoverflow.com/questions/43758400/what-is-the-difference-between-ng-bootstrap-and-ngx-bootstrap) – Hareesh Nov 04 '17 at 09:20
-
Possible duplicate of [What is the difference between "ng-bootstrap" and "ngx-bootstrap"?](https://stackoverflow.com/questions/43758400/what-is-the-difference-between-ng-bootstrap-and-ngx-bootstrap) – Amit G Oct 21 '19 at 11:25
3 Answers
Both are good, you can flip a coin and use any of one.
I am ng-bootstrap
for my projects, so far no problem.
But selecting a framework can be tricky, you should consider many facts.
First both support Angular 4
and Bootstrap 4
, but ngx-bootstrap
support Bootstrap 3
too.
While checking in to the closed questions in github ngx-bootstrap
wins, check these links ng-bootstrap, ngx-bootstrap.
ngx-bootstrap
team also has more modules like ng2-file-upload
more here
and also check Stackoverflow unanswered questions ng-bootstrap, ngx-bootstrap. That means there is more chance for ngx-bootstrap problems get answered in SO.

- 13,617
- 16
- 88
- 129

- 6,770
- 4
- 33
- 60
@ng-bootstrap/ng-bootstrap
and ngx-bootstrap
both refer to different implementations of Bootstrap Components for Angular(2+). They are both implemented by different teams, with the same goal, that is to provide bootstrap components in Angular(2+) without the use of jquery.
As for your question of which one is better, the answer would depend on your requirements. ngx-bootstrap
supports both Bootstrap 4 Alpha and Bootstrap 3 (with a patch). ng-bootstrap only supports Bootstrap 4. If you used the ui-bootstrap
library for angularjs, it's worth noting that ng-bootstrap
was developed by the same team that developed ui-bootstrap
. Other than that, you can explore each of their APIs to determine which one you can work with better.
ngx-bootstrap: https://valor-software.com/ngx-bootstrap/#/
@ng-bootstrap: https://ng-bootstrap.github.io/#/home

- 2,945
- 2
- 25
- 32
Best way to quickly integrate Bootstrap 3 or Bootstrap 4 Components with Angular use ngx-bootstrap npm packs. ngx-bootstrap contains all core (and not only) Bootstrap components powered by Angular. So you don't need to include original JS components, but we are using markup and css provided by Bootstrap.
Install ngx-bootstrap from npm using
npm install ngx-bootstrap --save
If you need bootstrap 3 styles include
<!-- index.html -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
If you need bootstrap 4 styles include
<!--- index.html -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet">
Enjoy Happy codeing. Hopefully that helps!

- 481
- 5
- 12