Questions tagged [ng-bootstrap-modal]

This tag is used when you decide to use the ng-Bootstrap-Modal instead of the regular Bootstrap Modal for Angular projects. More info: https://ng-bootstrap.github.io/#/components/modal/examples

Ng-Bootstrap Modals are a kind of Bootstrap Modals powered by Ng-Bootstrap for Angular.

More info:

https://ng-bootstrap.github.io/#/components/modal/examples

30 questions
4
votes
3 answers

How to open an ng-Bootstrap-Modal that is a child component?

I'm new with Angular and I have some doubts about Modals with ng-Bootstrap. I've been able to open Modals that are in the same component and they work fine, an example is this one: Link:
3
votes
3 answers

Angular NgbModal, how to correctly close a modal window?

I am working on an Angular application using NgbModal to handle modal. I have some doubts about how properly close a modal implemented with this component (untill now I always used PrimeNg instead ng-bootstrap). Basically I have done in this way…
AndreaNobili
  • 40,955
  • 107
  • 324
  • 596
3
votes
2 answers

ng-bootstrap Modal pass additional class to .modal-dialog

I am currently using a custom theme inside a angular application where i need to append a additional css class to the ".modal-dialog" container, which is inside of ngb-modal-window. According to the documentation…
Mario
  • 41
  • 1
  • 3
2
votes
0 answers

What does the "let-modal" tag do?

So, I've been using a basic ng-bootstrap modal for an Angular app.
2
votes
1 answer

Angular 9 :: NgbModal is navigating on load

I'm having issues loading two modals (openModalEdit and openModalDetail method) on my Angular 9 project. When I open it, it automaticly navigates to the root route. I have another instance (openModalCreate method) of a modal in the same component,…
1
vote
1 answer

Test the callback function in a NgbModal closed Observable with Jasmine

I'm working on an Angular (14) project with nb-bootstrap and testing with Jasmine. In my code I have this function which opens a modal to add groups (aka labels or tags) in a list. Which you can apply on recipients (in another function) to…
nurovek
  • 97
  • 5
1
vote
0 answers

Should I manually call unsubscribe() on NgbModal @Output() EventEmitter subscription?

I'm opening ng-bootstrap's NgbModal programmatically and subscribing to some @Output() EventEmitter. I'm wondering if I should manually call unsubscribe() on each subscription or if that's handled somehow by Angular / NgBootstrap already? What I'm…
dstj
  • 4,800
  • 2
  • 39
  • 61
1
vote
0 answers

ng-bootstrap modal uses default change detection -- is there away to enforce on push?

I have an angular app that enforces on push change detection or detach, depending on the component. The app uses ng-bootstrap for a few components, namely modals. While profiling the app, change detection cycles in the Angular profiler are showing…
RTD
  • 334
  • 2
  • 12
1
vote
0 answers

Navigation links stop working after using ng-bootstrap modal to show a component

I want to be able to display a component on both the main page and in an ng-bootstrap modal. The link to display the modal is inside another component. To do this I placed tags on the main page and inside the modal. Because the…
WillM
  • 11
  • 3
1
vote
1 answer

ngFor with ngBootstrap NgbModal Open - Angular Bootstrap

I am having an issue with calling an NgbModal open() within an item rendered within a *ngFor loop. I have a list of items that I want to display. On click of said item, I want a modal to open in order to prompt the user for some additional…
1
vote
0 answers

Migration issue Angular 8 to 9

I'm updating my angular project to use angular 9. In angular 8 I was using ng5-bootstrap-modal, but now I'm getting error: ERROR in node_modules/ng5-bootstrap-modal/dist/bootstrap-modal.module.d.ts:4:22 error NG6002: Appears in the…
Vanessa
  • 11
  • 4
1
vote
0 answers

Open NgbModal within a Promise will not autofocus within the new modal

To show an error message, I want to open a modal within a Promise that gets resolved from another modal. The scenario is like this: When user clicks on a button, a modal pops up and shows a form. After user has entered the necessary information,…
Pepi Wang
  • 11
  • 1
1
vote
1 answer

ngFor on table rows with clickable modal windows. How to do that modal windows with ng-bootstrap .open() function?

I am trying to make a table, that will show venues in the city. I am using a *ngFor loop to display the venues (table rows). After clicking on the table row, the modal window with more informations should appear. I am using a ng-bootstrap and…
microHoffman
  • 134
  • 1
  • 3
  • 12
1
vote
1 answer

Unable expend options of Years in the ng Bootstrap datepicker in Angular

I am working in Angular 8 with ng Bootstrap Datepicker I am getting limited range of Year in DatePicker box in year dorpdown I am sharing my code
0
votes
0 answers

custom adapter ng bootstrap

i have a problem whit display the date in the variable selectedDate on ngmodel of my modal bootstrap, here the code html of modal:
1
2