Do you know how to get it to work with a Material Dialog instead of a viewcontainer, like this?
this.lazyLoader.load("lazy").then(res => { this.dialog.open(res.componentType) })
I extended your sample at stackblitz.com/edit/lazy-angular-d... but also recieve Error: No component factory found for LazyComponent. Did you add it to @NgModule.entryComponents?
Error: No component factory found for LazyComponent. Did you add it to @NgModule.entryComponents?
Hi,
Have you tried providing alternate componentFactoryResolver in material dialog config?
componentFactoryResolver
Thanks. Yes, I tried this but it still causes the same error in Angular 8. I updated the Stackblitz.
In Angular 9 this is fixed and there's no need to pass componentFactoryResolver 👏
I think it's related to this issue github.com/angular/angular/issues/...
Some comments have been hidden by the post's author - find out more
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Do you know how to get it to work with a Material Dialog instead of a viewcontainer, like this?
I extended your sample at stackblitz.com/edit/lazy-angular-d... but also recieve
Error: No component factory found for LazyComponent. Did you add it to @NgModule.entryComponents?
Hi,
Have you tried providing alternate
componentFactoryResolver
in material dialog config?Thanks. Yes, I tried this but it still causes the same error in Angular 8. I updated the Stackblitz.
In Angular 9 this is fixed and there's no need to pass componentFactoryResolver 👏
I think it's related to this issue github.com/angular/angular/issues/...