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.

Lazy loaded component modal opening doesn't work

See original GitHub issue

While opnening a modal from lazy loaded component, we have the following error:

ERROR Error: Uncaught (in promise): Error: Runtime compiler is not loaded

This feature is now broken so we need to find a fix asap.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
marie-dkcommented, May 5, 2020

I’ve the correct error on my stackblitz Cannot find modal with identifier customers

https://stackblitz.com/edit/angular-lazy-loading-smart-modal

I just made a stackblitz with Angular 9 and NgxSmartModal. I get the same error. Did you figure it out?

0reactions
lfbharatcommented, Apr 13, 2022

I was facing ERROR Error: Cannot find modal with identifier. ngx modal throwing error when I try to open or close modal using ngxSmartModalService.open('identifier') or ngxSmartModalService.close('identifier') in component ts file. but when I try using modal reference. it solved my problem: HTML: <button (click)="modalPopup.open();">open modal</button> <ngx-smart-modal #modalPopup identifier="identifier"> </ngx-smart-modal>

Hey !

The open and close methods on the service need an identifier https://maximelafarie.com/ngx-smart-modal/#/api

Yes @LouisAugry updated the comment ^.

Read more comments on GitHub >

github_iconTop Results From Across the Web

lazy loading error when working with modals components
hello i'm trying use to use lazy loading with modal component, so i have a shared components module like this:
Read more >
Modal | Components - BootstrapVue
Modals will not render their content in the document until they are shown (lazily rendered). Modals, when visible, are rendered appended to the...
Read more >
How to declare and use modals in Ionic v4 | by David Dal Busco
The modal is lazy loaded, BUT, it will not be loaded when you open it, as you probably would except, but rather when...
Read more >
How to Lazy Load a Component in Angular - Telerik
Here --skip-import flag is used so that Angular does not declare GreetComponent in the module, as you wish to load GreetComponent dynamically.
Read more >
React lazy loading and performance - Retool
Lazy loading works well for common UX components and patterns like ... open up a modal or a pop-up saying, “Added to cart...
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