-
Notifications
You must be signed in to change notification settings - Fork 109
Open
Description
you can provide to make the test for components using import inside a component? (no router module)
example:
async loadImportXlsx(){
// avoid user throttling
if (this.isLoadingImportXlsx) return;
this.isLoadingImportXlsx = true;
const config: MatDialogConfig = {
width: '85%',
height: '95%',
disableClose: true,
data: {
currentDomain: this.selectedDomain
}
};
// how test this line?
const lazyComponent = await import('@pages/import/import.component');
const dialogRef = this.dialog.open(lazyComponent.ImportComponent, config);
dialogRef
.beforeClosed()
.subscribe(data => this.title.setTitle(this.dashboardTitle));
setTimeout(() => {
this.isLoadingImportXlsx = false;
}, 1300);
}this code gets a ngModule using lazy load (with import) and then open it inside a new Material Dialog
Metadata
Metadata
Assignees
Labels
No labels