1

I would like to start off with a new Angular 2 Project. Since I want to use Bootstrap 3 for a UI, I wonder what is best practice here?

Can I mix ng-bootstrap and the "native" bootstrap together? For example, I couldn´t find a navbar directive in ng-bootstrap. So I have to build it with "native" bootstrap, right?

Any suggestions?

1 Answer 1

1

I think it's ok because ng-boostrap just add some ng2 components to your application (and a lot of documentation and examples, thanks to them). Bootstrap CSS will work natively with html tags, attribute and classes.

I suggest you to take a look at sources here, you will see that there are no more javascript or ressources than native library :

Welcome to the Angular 2 version of the Angular UI Bootstrap library. This library is being built from scratch by the ui-bootstrap team. We are using TypeScript and targeting the Bootstrap 4 CSS framework.

Sign up to request clarification or add additional context in comments.

4 Comments

So I can just install ng-bootstrap and have full bootstrap functionalities? I wonder because there is no jQuery in there e.g.
No, you have to install Bootstrap manually in your app. In my case I just added this line in my index.html file : <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> but they suggest to use Bootstrap 4 available (in beta) here : v4-alpha.getbootstrap.com
But still I just need the CSS part of bootstrap? Or Jquery as well?
For the native use, you'll need the jQuery (and Tether somtimes ?) libraries. You can install it properly with npm : npm install jquery --save then import $ from "jquery"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.