You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A page that was working perfectly with the NgbModals, now is having serious (and business-critical) issues that are giving us a huge headache. Basically, our page consists of a Menu component, and a router-outlet which acts as container for all of our apps.
We use this modal in many parts of the app, and it always worked great! Now it only works in the router-outlet, the inner apps. In the Menu component, it doesn't. You can check the problem in the following Stackoverflow question:
I think this may be some kind of bug of the NgbModal module, because of the strange behavior of the library not being able to put the content inside the "modal-body" part of it.
Can you guys please take a look at this? I don't understand how this can stop working without having changed anything...
By the way, I'm using the Firefox Quantum navigator, Angular 5. NgBootstrap version 1.0.0-beta.6" (maybe I should try to update it?)
The text was updated successfully, but these errors were encountered:
I'm sorry but there is really not enough context / background info to help here. From the SO question I can see that the modal element is properly added to the DOM but the content of the modal is empty. This would indicate that content of the modal is either not passed properly or is empty.
There is really nothing else I can say based on the info provided. Please expand your SO question to show more code around actual call to the modal service. We can continue the discussion in there.
Side note - you should definitively update this library and Angular.
I found a solution for the problem, although the nature of what caused the problem is still unknown.
I had a method call in a "click" event of the template, which sent a string (for a switch, not big deal) and a template variable (those that are declared with "#" in the template itself). Then, in the method that handles this click, you usually could simply get the second parameter pointing to that variable, which was the modal.
Somehow, that used to work, but now suddenly, that variable seems to be "undefined". So I just used @ViewChild() for accessing those template variables of the modals, and that fixed up everything. But I wonder why this stopped working all of a sudden...
But yeah, anyways, it's not your problem. Probably more an Angular problem or so. Updated the library anyways.
Bug description:
A page that was working perfectly with the NgbModals, now is having serious (and business-critical) issues that are giving us a huge headache. Basically, our page consists of a Menu component, and a router-outlet which acts as container for all of our apps.
We use this modal in many parts of the app, and it always worked great! Now it only works in the router-outlet, the inner apps. In the Menu component, it doesn't. You can check the problem in the following Stackoverflow question:
https://stackoverflow.com/questions/51256652/ngbmodal-suddenly-stopped-working-in-an-angular-5-project-for-no-reason?noredirect=1#comment89492096_51256652
I think this may be some kind of bug of the NgbModal module, because of the strange behavior of the library not being able to put the content inside the "modal-body" part of it.
Can you guys please take a look at this? I don't understand how this can stop working without having changed anything...
By the way, I'm using the Firefox Quantum navigator, Angular 5. NgBootstrap version 1.0.0-beta.6" (maybe I should try to update it?)
The text was updated successfully, but these errors were encountered: