angular 8 material dialog close button with X top right

The easy way now is:

<div mat-dialog-title class="dialog-title">
  <h2>Title</h2>
  <button mat-icon-button aria-label="close dialog" mat-dialog-close>
    <mat-icon>close</mat-icon>
  </button>
</div>

And the dialog-title css is

.dialog-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

That’s working on Angular 8.0.0

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)