Skip to content

Instantly share code, notes, and snippets.

@KaranPato
Created August 23, 2019 04:51
Show Gist options
  • Save KaranPato/0a342f9d42943e9c549eac7980b9ba27 to your computer and use it in GitHub Desktop.
Save KaranPato/0a342f9d42943e9c549eac7980b9ba27 to your computer and use it in GitHub Desktop.
HTML for Recipe list.
<div class="container-fluid">
<div>
<button *ngIf="!isAdd" mat-raised-button color="primary" class="btn-right mt-2" [routerLink]="['/add-update-recepi', 0]">Add Recipe</button>
</div>
<div class="container">
<mat-grid-list cols="3" rowHeight="500px">
<mat-grid-tile *ngFor="let data of dataSource">
<div class="container">
<mat-card class="example-card">
<mat-card-header>
<mat-card-title>{{data.recepiName}}</mat-card-title>
</mat-card-header>
<img mat-card-image src="../../assets/1.jpeg" alt="Photo of a Shiba Inu" width="100px;">
<mat-card-content>
<p>
{{data.recepiDesc}}
</p>
</mat-card-content>
<mat-card-actions>
<button mat-raised-button color="primary" [routerLink]="['/add-update-recepi', data.recepiId]">Edit</button>
<button mat-button>
<mat-icon class="example-icon" aria-hidden="false" aria-label="Example delete icon" (click)="DeleteRecepi(data.recepiId)">delete</mat-icon>
</button>
</mat-card-actions>
</mat-card>
</div>
</mat-grid-tile>
</mat-grid-list>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment