angulr material popup without component redirect click here
openDialogWithoutRef() {
this.dialog.open(this.secondDialog);
}
@ViewChild('secondDialog', { static: true }) secondDialog!: TemplateRef<any>;
<button mat-button color="accent" (click)="openDialogWithoutRef()">
Open second dialog</button>
<ng-template #secondDialog>
<h2 matDialogTitle>Lovely dialog!</h2>
<mat-dialog-actions align="end">
<button mat-button matDialogClose color="primary">I
dialogs!</button>
</mat-dialog-actions>
</ng-template>
No comments:
Post a Comment