Questions tagged [ngx-bootstrap]

Use this tag for any query related to ngx-bootstrap. ngx-bootstrap is an open-source (MIT Licensed) project created by Valor Software, which provides an easy way to quickly implement Bootstrap 4 and 5 designs (Bootstrap 3 is now deprecated) with Components natively created for Angular.

ngx-bootstrap contains all core Bootstrap components (with some additional components) powered by Angular.

Learn more about ngx-bootstrap here.

958 questions
315
votes
42 answers

How to add bootstrap to an angular-cli project

We want to use bootstrap 4 (4.0.0-alpha.2) in our app generated with angular-cli 1.0.0-beta.5 (w/ node v6.1.0). After getting bootstrap and its dependencies with npm, our first approach consisted in adding them in…
Jerome
  • 4,472
  • 4
  • 18
  • 18
287
votes
9 answers

What is the difference between "ng-bootstrap" and "ngx-bootstrap"?

What is the difference between ng-bootstrap and ngx-bootstrap? Are they related to each other? Or are they simply concurrent implementations? Has someone worked with them both and can give/explain pros and cons of both? With ng-bootstrap I mean…
wolfrevo
  • 6,651
  • 2
  • 26
  • 38
49
votes
9 answers

ngx-bootstrap modal: How to get a return value from a modal?

In my Angular 4 app, let's assume that I'm inside a service. At some point, I want to ask the user for a confirmation, currently I'm doing it with just a confirm(...) request: const result = confirm('Are you sure?'); What if instead I would like to…
40
votes
3 answers

difference between ngx-bootstrap and ng2 bootstrap?

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…
Asad
  • 3,070
  • 7
  • 23
  • 61
39
votes
7 answers

Cannot find module 'ngx-bootstrap'

I'm having an issue in my application with ngx-bootstrap whereby it now can't detect the module unless you specify the path For example: import { BsModalService, BsModalRef } from 'ngx-bootstrap'; produces "Cannot find module…
chr15r
  • 569
  • 1
  • 5
  • 8
28
votes
2 answers

How can I use Bootstrap navbar in ngx-bootstrap for Angular 5?

Bootstrap navbar doesn't exist in the ngx-bootstrap components list. Please help me to implement it.
Hossein Bajan
  • 2,644
  • 5
  • 19
  • 36
20
votes
9 answers

Angular use modal dialog in canDeactivate Guard service for unsubmitted changes (Form dirty)

In my Angular 4 application I have some components with a form, like this: export class MyComponent implements OnInit, FormComponent { form: FormGroup; ngOnInit() { this.form = new FormGroup({...}); } they use a Guard service to prevent…
Francesco Borzi
  • 56,083
  • 47
  • 179
  • 252
17
votes
9 answers

How to center an ngx-bootstrap modal

Trying to center this ngx-boostrap modal using CSS like this but it's not working: .modal.fade.in{ display: flex; justify-content: center; align-items: center; } But in the dev tool, I'm able to add CSS like this: .modal.dialog{ top:…
HDJEMAI
  • 9,436
  • 46
  • 67
  • 93
14
votes
1 answer

Way to add custom class when using ngx-bootstrap modalService

When looking to the ngx-bootstrap source code here: modal-options.class.ts There is an optional class property defined as class?: string;. What is the way to use it ? Is it possible to add a custom class like: this.modalService.config.class =…
HDJEMAI
  • 9,436
  • 46
  • 67
  • 93
13
votes
7 answers

"let-" is only supported on ng-template elements

I am trying to get my frontend-application(Angular5.1.x) to run but it stops due to template parse error: "let-" is only supported on ng-template elements. ("