I am using NbDialogService from the Nebular component package to open Dialog components.
I am using something like this:
const dialogRef = this.dialogService.open(MyDialogComponent, { ... });
I am trying to load the dialog using the new capability of angular 9 to lazy load specific component without the need to load a whole module
Something like this:
import('./dialogs/my-dlg.component').then(({ MyDialogComponent}) => {
const component = this.componentFactoryResolver.resolveComponentFactory(MyDialogComponent);
this.dialogService.open(MyDialogComponent, {
context: {
dlgTitle: 'Add Product',
topLabel : 'Add Product(s)'
}
}).onClose.subscribe((ev)=> {
});
});
But the dialog is does not show up correctly
Any ideas how to solve it?