Skip to content

Instantly share code, notes, and snippets.

@KaranPato
Created August 24, 2019 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaranPato/c3b06543e716685c42e2e9b55a10f0d3 to your computer and use it in GitHub Desktop.
Save KaranPato/c3b06543e716685c42e2e9b55a10f0d3 to your computer and use it in GitHub Desktop.
AddUpdateRecipeComponent CSS file.
<div>
<mat-progress-bar [mode]="'indeterminate'" *ngIf="isLoading">
</mat-progress-bar>
<div class="container text-center">
<form [formGroup]="employeeForm" (ngSubmit)="onSubmit()">
<mat-card class="example-card">
<mat-card-header>
<h3>{{isAdd == true ? 'Add Recepi' : 'Update Recepi'}}</h3>
</mat-card-header>
<mat-card-content>
<div class="example-container">
<mat-form-field>
<input class="form-control" matInput placeholder="Recipe Name" name="recepiName"
formControlName="recepiName">
<mat-error *ngIf="employeeForm.controls['recepiName'].invalid && submitted">
Recepi name is required.
</mat-error>
<mat-error *ngIf="employeeForm.controls['recepiName'].invalid && !submitted">
Recepi name is required.
</mat-error>
</mat-form-field>
<mat-form-field>
<textarea class="form-control" matInput placeholder="Description" name="recepiDesc"
formControlName="recepiDesc"></textarea>
<mat-error *ngIf="employeeForm.controls['recepiDesc'].invalid && submitted">
Please describe your recepi.
</mat-error>
<mat-error *ngIf="employeeForm.controls['recepiDesc'].invalid && !submitted">
Please describe your recepi.
</mat-error>
</mat-form-field>
</div>
</mat-card-content>
<mat-card-actions>
<button mat-raised-button type="submit" color="accent">
{{isAdd == true ? 'Add Recepi' : 'Update Recepi'}}
</button>
</mat-card-actions>
</mat-card>
</form>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment