1

I am using angular-cli@webpack version with ng-bootstrap (not ng2-bootstrap). I did the following to my angular-cli project:

npm install --save @ng-bootstrap/ng-bootstrap

Then followed by adding this to my file:

import {NgbModule} from '@ng-bootstrap/ng-bootstrap';

Then I added this to index.html:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.3/css/bootstrap.min.css">

Great it is all working. My question:

(Part 1) Do I really have to add bootstrap.min.css in index.html? Can I don't add bootstrap.css to index.html and still use ng-boostrap?

(Part 2) If no, then why can't ng-bootstrap just include bootstrap.css in their setup and so I don't need to add it to index.html?

2
  • 2
    1) have you tried it? 2) because people might want to use a custom bootstrap.css file. Commented Aug 20, 2016 at 7:35
  • I have tried not adding bootstrap.css to index.html. Ng-bootstrap doesn't work. I'm just curious why doesn't ng-bootstrap include bootstrap.css in their setup. I think got the answer from you. It's because some people might want to use a custom bootstrap.css file. Nice one :) Commented Aug 20, 2016 at 7:51

1 Answer 1

2

not sure wheather you have checked there official page, it clearly that for the time being there are 2 dependencies :

  1. angular version
  2. bootstrap css

Dependencies This repository contains a set of native Angular 2 directives based on Bootstrap's markup and CSS. As a result no dependency on jQuery or Bootstrap's JavaScript is required. The only required dependencies are:

Angular (requires Angular version 2 or higher, tested with 2.0-rc.5) Bootstrap CSS (tested with version 4.0 alpha V3)

edit : from logical prospective: because people might want to use a custom bootstrap.css file. as mentioned by @juhana

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

3 Comments

Yes I read the page. I was just wondering why can't it include bootstrap css in the setup of ng-bootstrap? I am coming from the learning perspective.
I just the answer from @Juhana. People might want to use a custom bootstrap.css
There is nothing about -integration- of ng-bootstrap on the linked page. That's why people are asking this question.

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.