dialog.component.html
701 Bytes
<h1 matDialogTitle>Withdraw</h1>
<form [formGroup]="form">
<div mat-dialog-content>
<mat-form-field>
<input matInput placeholder="Remark" [formControl]="form.controls['remark']" required>
<mat-error *ngIf="form.controls['remark'].hasError('required') && form.controls['remark'].touched"
class="mat-text-warn">You must include remark.</mat-error>
</mat-form-field>
</div>
<br>
<div mat-dialog-actions>
<button type="button" mat-raised-button color="primary" [disabled]="!form.valid">Submit{{ btn_name}}</button>
<span fxFlex></span>
<button mat-raised-button color="accent" (click)="dialogRef.close(false)">No Thanks!</button>
</div>
</form>