Getting started directly on ng-bootstrap (without working on 1.5.8)

290 views Asked by At

I am just beginning to use Angular and Bootstrap. I had set up my environment for AngularJS 2 and Bootstrap. I completed the instructions on ng-bootstrap's Install instns page. Now, I also installed the Bootstrap 4.0.0-alpha package on my Node and hence can import them successfully (npm tsc compiles my modules without any remarks). Now for the actual questions, which I am asking because I could not go beyond what I had already described, by just reading thru the ng-bootstrap website

  1. Do I need to add any jQuery imports at all? If AngularJS 2 already has them, then how can I include them into my scripts/(indirectly reffed by the stylesheets)?

  2. Have the style element addition methods changed from UI-Bootstrap to ng-bootstrap? I mean, to develop ng-bootstrap components for my application, can I use the old UI instructions? The AngularJS syntax as I see from the UI bootstrap site is pretty old and there is also nothing to tell me that UI bootstrap works well with Angular2

  3. Can I use boostrap themes that are available on their website with the latest release of Bootstrap itself?

  4. Can I use only the style sheets of Bootstrap 4 (the old way of referring to a stylesheet from the HTML file) and skip the JS files? (I may not be able to do that because the JS files themselves may be needing jQuery and the anime effects of Bootstrap need JS).

Can somebody please clear the doubts?

1

There are 1 answers

1
Sam Hughes On

Here is the ng-bootstrap "Getting Started" page. It has the 3 imports you should need.

However, be aware that the latest releases of ng-bootstrap and Bootstrap 4 are completely incompatible, with almost everything in ng-bootstrap broken (navs, collapses, dropdowns, etc.). It's a shame that the dev(s) of the package has not released anything about it, although it has only been 2-3 days, so...

So, if you do not want to wait, make sure to install Bootstrap 4 Alpha 5, and not 6 (as well as the aforementioned imports stated in the ng-bootstrap Getting Started page).