Tuesday, 19 October 2021

angular material popup

 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

7 Common mistakes in Dot Net — You can avoid

  There are many common mistakes made during .NET (ASP.NET, .NET Core) development, which affect performance, security, and code… Code Crack...