40

I'm making project in bootstrap (UI) and angular 2. I'm new to both things My friend suggests me to use ng2 bootstrap I am so much confused between ngx bootstrap and ng2 bootstrap. Always when I search ng 2 bootstrap it take me to the ngx bootstrap. What is the difference between the two?

snorkpete
  • 14,278
  • 3
  • 40
  • 57
Asad
  • 3,070
  • 7
  • 23
  • 61

3 Answers3

33

Since Angular2 is released, many components are published as npm modules and most them have prefix - ng2- or angular2- like ng2-bootstrap, angular2-tags-input.

After releasing Angular4, all those node modules were faced with serious problem - "Do we have to be renamed to ng4 or angular4???"

Here is an answer written by Igor Minar from Angular Core Team.

http://angularjs.blogspot.com/2016/12/ok-let-me-explain-its-going-to-be.html

"It’s just “Angular”"

As you can see here, Angular2 and Angular4 are all Angular.

And Upgrading version is not painful anymore like 2 to 4. Just do ng upgrade or ncu -u -a.

From now angular components should be ngx-something.

Mika
  • 5,807
  • 6
  • 38
  • 83
Liu Zhang
  • 1,808
  • 19
  • 31
29

ng2-bootstrap and ngx-bootstrap are one and the same: ng2-bootstrap was the old name, ngx-bootstrap is the new name. It's a project that's attempting to create an Angular-specific version of the Twitter Bootstrap components (i.e. no dependency on jQuery). The project is run by Valor Software. I don't have inside knowledge but my guess is that the name change happened when Angular rebranded itself as just 'Angular' (instead of Angular 2).

snorkpete
  • 14,278
  • 3
  • 40
  • 57
  • and then there's also something called `ng-bootstrap`: https://stackoverflow.com/questions/45983791/angular-powered-bootstrap-is-ngx-bootstrap/45984098 – bvdb Aug 31 '17 at 15:09
  • 1
    Please use `ngx-bootstrap` everyone. I don't find it as enjoyable moving onto the next contract with some random 3rd part component. Thanks a bunch! – Tom Stickel Jan 17 '18 at 17:03
5

ngx-bootstrap is Native Angular directives for Bootstrap 3 and Bootstrap 4. Contains all core and not only Bootstrap components powered by Angular. Basically, it's the same thing, but ng2 is the old name for the ngx.

Fernando Barbosa
  • 321
  • 4
  • 20