<h1 mat-dialog-title>Edit category</h1>

<div [formGroup]="formGroup" class='form'>
  <div mat-dialog-content>
    <mat-form-field *ngFor="let keyvalue of formGroup.controls | keyvalue">
      <mat-label>{{ keyvalue.key }}</mat-label>
      <input matInput
        [formControlName]="keyvalue.key"
        [class]="keyvalue.key"
      >
    </mat-form-field>
  </div>
  <div mat-dialog-actions>
    <button mat-button (click)="dialogRef.close()">Cancel</button>
    <button mat-button (click)="save()" type="submit" [disabled]="!formGroup.valid">Ok</button>
  </div>
</div>