Questions tagged [ngx-bootstrap-modal]

Use this tag when asking questions about modals dialogs generated with the ngx-bootstrap library.

84 questions
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
2 answers

Get reference to element inside ng-template

this is my template: I cant get reference to #newimg when its inside ng-template(it works fine if i change ng-template to…
Veto
  • 165
  • 1
  • 2
  • 7
8
votes
8 answers

How pass data from ModalService into component

I'm trying to use ngx-bootstrap-modal to pass data from a modal service into a modal component. The examples show this: this.modalService.show(ModalContentComponent, {initialState}); But it doesn't show how the ModalContentComponent actually…
MgSam
  • 12,139
  • 19
  • 64
  • 95
6
votes
1 answer

How to use component from module in entryComponents another module?

I have ngx-bootstrap modal component. This modal is used inside shared folder. I use this FirstModalComponent in my DashboardModule like: // Dashboard.module.ts import { FirstModalComponent } from…
Ihor Yanovchyk
  • 768
  • 6
  • 13
6
votes
3 answers

Angular 7 + ngx-bootstrap 3.1.3

Here is a blank angular 7 project in stackblitz, in Angular 6 I used constructor(private bsModalRef: BsModalRef) so I can pass values to my child popup component. But when I update to angular 7, it said Module not found: Error: Can't resolve…
Kunyuan Xiao
  • 175
  • 2
  • 13
5
votes
2 answers

Angular - error TS2307: Cannot find module 'ngx-bootstrap/modal'

I have installed ngx-bootstrap using the command npm install ngx-bootstrap --save but still when i am trying to build the solution it says ERROR in src/app/app.module.ts(37,45): error TS2307: Cannot find module 'ngx-bootstrap/modal'. I have checked…
rajat garg
  • 53
  • 1
  • 1
  • 5
5
votes
1 answer

ngx bootstrap open modal via routing

I have a ngx bootstrap modal that currently works and opens a Details Listing page with specific data for everyone of my Listings. However I would like to use routing so that my Listing Modal can be opened via direct url and populated with listing…
JDinar
  • 115
  • 1
  • 3
  • 9
5
votes
2 answers

How to install ngx-bootstrap to my angular 4 project

I may not be able to install ngx-bootstrap to my angular 4 project and hence not able to use the predefined templates. I had gone through below two links for ngx-bootstrap installation, please guide me the right way to do…
Braj Ankit
  • 333
  • 1
  • 2
  • 19
5
votes
1 answer

How can I pass and receive data to/from an ngx-bootstrap modal?

Passing data to a modal can be done using the initialState, but how can I receive data back? For instance, if I want to create a confirm dialog box?
Marcos Dimitrio
  • 6,651
  • 5
  • 38
  • 62
5
votes
4 answers

sending parameter to onHide event in ngx-bootstrap modal

I am opening a modal using component as a template, everything is ok, modal opens and I am subscribing to onHide Event, subscription works also. but I have a challenge here, I want to send a specific reason for example: 'message added…
Arash
  • 3,458
  • 7
  • 32
  • 50
3
votes
4 answers

ngx-bootstrap modal does not hide during test

In my Angular application, I'm writing some integration tests where I have an ngx-bootstrap modal In my integration tests, I'm testing a Component which contains a button that pops up a modal. Inside a modal, there is a "Save" button which is…
3
votes
2 answers

How to restrict Tab Key in the modal box?

I have a modal window that pops up when you click a .btn link. When it is active, users can still press Tab to focus on links and buttons in the background, some of which have download links. When these links are focused on and user pressed enter…
svs
  • 251
  • 1
  • 4
  • 12