What is the difference between “ng-bootstrap” and “ngx-bootstrap”?

后端 未结 9 2395
梦如初夏
梦如初夏 2020-12-02 05:39

What is the difference between \"ng-bootstrap\" and \"ngx-bootstrap\"? Are they related to each other? Or are they simply concurrent implementations?

Has someone wor

相关标签:
9条回答
  • 2020-12-02 06:10

    ng-bootstrap doesn't appear to be supported - the top request is appendTo body and the maintainer says he isn't working on the project.

    I've been switching everything to ngx-bootstrap

    0 讨论(0)
  • 2020-12-02 06:13

    Not so much an answer as an extended comment...

    I'm not so sure about the teams being independant. Running npm view ngx-bootstrap and npm view ng-bootstrap show that both were published with the same email account.

    I'm thinking the two teams are related.

    npm view ngx-bootstrap

    C:\:
    17:07:25.16>npm view ngx-bootstrap
    
    ngx-bootstrap@3.0.1 | MIT | deps: none | versions: 40
    Native Angular Bootstrap Components
    https://github.com/valor-software/ngx-bootstrap#readme
    
    keywords: angular, bootstap, ng, ng2, angular2, twitter-bootstrap
    
    dist
    .tarball https://registry.npmjs.org/ngx-bootstrap/-/ngx-    bootstrap-3.0.1.tgz
    .shasum: e98d2fc6340f32a9d358cd08e8fda7dcb23bdab3
    .integrity: sha512-ni91yYtn8ldgf/pxrlwl9lkVcLURGzopSpJnEbbgG1v1EZWTobI8y7J3mx4Kxptkn0EeiQwnLel67G7XJSox4A==
    .unpackedSize: 8.4 MB
    
    maintainers:
    - valorkin <valorkin@gmail.com>
    
    dist-tags:
    latest: 3.0.1       next: 3.0.1         test: 0.0.0-test.0
    
    published a month ago by valorkin <valorkin@gmail.com>
    

    npm view ng-bootstrap

    C:\:
    17:16:42.36>npm view ng-bootstrap
    
    ng-bootstrap@1.6.3 | MIT | deps: 1 | versions: 8
    Native Angular Bootstrap Components
    https://github.com/valor-software/ngx-bootstrap#readme
    
    keywords: ng, ng-bootstap, angular, angular2, bootstrap, twitter-bootstrap
    
    dist
    .tarball https://registry.npmjs.org/ng-bootstrap/-/ng-bootstrap-1.6.3.tgz
    .shasum: d41fd42154c0593422cb83c473a3828aa7525bf5
    
    dependencies:
    moment: 2.18.1
    
    maintainers:
    - pkozlowski_os <pkozlowski.opensource@gmail.com>
    - ng-bootstrap <foxandxss@gmail.com>
    
    dist-tags:
    beta: 1.1.16-3  latest: 1.6.3
    
    published a year ago by valorkin <valorkin@gmail.com>
    
    0 讨论(0)
  • 2020-12-02 06:21

    I was thinking about what to use for my project and then after comparing both the projects I think ngx-bootstrap by valor-software is a better option since it has animation built into it's modal component. Ng-bootstrap the animation is still not present, A modal popping up without a animation is a major bummer. Other reason is that Ng-bootstrap is still in beta and I was unable to use it for my production application when comparing with ngx-bootstrap which already has a release candidate version out (12.22.2017). However I wish both the projects good luck and will hopefully come up with solid solutions.

    0 讨论(0)
  • 2020-12-02 06:22

    The ng-bootstrap referred to in the question (the one at https://ng-bootstrap.github.io) is not the npm package ng-bootstrap.

    Instead, the npm package is @ng-bootstrap/ng-bootstrap

    It is developed by a different team.

    $ npm view @ng-bootstrap/ng-bootstrap

    @ng-bootstrap/ng-bootstrap@3.2.0 | MIT | deps: 1 | versions: 61 Angular powered Bootstrap https://github.com/ng-bootstrap/ng-bootstrap#readme

    The npm package ng-bootstrap looks to be indeed an older version of ngx-bootstrap.

    0 讨论(0)
  • 2020-12-02 06:27

    it depends on needs but following rule of thumb, ng-bootstrap is more suitable in general due to following:

    • ng-bootstrap has more stars
    • ng-bootstrap is relatively newer solution
    • ng-bootstrap is lighter

    If I don't have any specific reason to go for bootstrap 3, then ng-bootstrap should be preferred.

    please refer to following github repos for more details about fact and figures:

    • https://github.com/valor-software/ngx-bootstrap
    • https://github.com/ng-bootstrap/ng-bootstrap
    0 讨论(0)
  • 2020-12-02 06:28

    I've used both ngx-bootstrap(by Valor) and ng-bootstrap(by ng-boostrap). Here are my two cents of the unique features you get from them:

    ngx-bootstrap:

    1. Builtin animation support on almost everything (modals, accordion, collpase, dropdown, datepicker...)
    2. Better Modal support (nested modals, modal as a service, modal as a template)
    3. Sortable Component (with Drag&Drop Feature)

    ng-bootstrap:

    1. Nav Feature (Tabset has been made deprecated)
    2. Builtin Toast component
    3. Package size is almost half times as ngx-bootstrap (Minified + Gzipped)

    You can also compare between their npm download counts with npmtrends.

    [Note: My answer is based current latest version i.e ngx-bootstrap v5.5.0 and ng-boostrap v6.0.0]

    0 讨论(0)
提交回复
热议问题