question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Modal is not opening even with "ngbModalContainer"

See original GitHub issue

alpha-6

I’m using Your modal example. I have <template ngbModalContainer></template> in html but still I have Missing modal container, add <template ngbModalContainer></template> to one of your application templates. error.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
narainsagarcommented, Dec 8, 2016

I got a fix. I was importing NgbModule in different / wrong module. Make sure you import it in module where you’ve declared the components (in which you’re using modals, etc) OR SAY import in the parent i.e., AppModule

Cheers, 9

0reactions
michaelrgallowaycommented, Oct 11, 2016

@piernik I had the same ‘issue’ whereas the modal wouldnt open even with the template directive present. My problem was I was missing the entryComponents array in my module that listed the content component. Adding my content in this array fixed the issue. This may or may not be your issue as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular + ng-bootstrap - Modal : window does not open
As described in ng-bootstrap NgbModal "A service to open modal windows" and it has no properties to open modal window in new browser...
Read more >
Modal - Angular powered Bootstrap
First focusable element within the modal window will receive focus upon opening. This could be configured to focus any other element by adding...
Read more >
How to create a reusable Modal component in Angular 9 ...
The controller gets the template of the modal and opens it using the NgbModal service and then uses the NgbModalRef obtained to close...
Read more >
Modal Options - W3Schools Tryit Editor
<p>The backdrop option specifies whether the modal should have a dark overlay (the background color of the current page) or not.</p>
Read more >
Modal · Bootstrap v5.1
Toggle a working modal demo by clicking the button below. ... When backdrop is set to static, the modal will not close when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found