|
|
|
@ -2,26 +2,30 @@
|
|
|
|
|
<mat-card class="example-card" appearance="outlined">
|
|
|
|
|
<mat-card-header>
|
|
|
|
|
<mat-card-title-group>
|
|
|
|
|
<mat-card-title>{{ recipe.name }}</mat-card-title>
|
|
|
|
|
<mat-card-subtitle>{{ recipe.description }}</mat-card-subtitle>
|
|
|
|
|
<img
|
|
|
|
|
mat-card-xl-image
|
|
|
|
|
*ngIf="recipe.image; else placeholder"
|
|
|
|
|
[src]="recipe.image"
|
|
|
|
|
alt="{{ recipe.name }}"
|
|
|
|
|
style="max-width: 500px; max-height: 500px"
|
|
|
|
|
/>
|
|
|
|
|
<ng-template #placeholder>
|
|
|
|
|
<img
|
|
|
|
|
mat-card-xl-image
|
|
|
|
|
src="https://placehold.co/500x500"
|
|
|
|
|
alt="Placeholder Image"
|
|
|
|
|
style="max-width: 500px; max-height: 500px"
|
|
|
|
|
/>
|
|
|
|
|
</ng-template>
|
|
|
|
|
<mat-card-title>Name : {{ recipe.name }}</mat-card-title>
|
|
|
|
|
<mat-card-subtitle class="description">Description :</mat-card-subtitle>
|
|
|
|
|
<mat-card-subtitle class="description">
|
|
|
|
|
<span [innerHTML]="formattedDescription"></span>
|
|
|
|
|
</mat-card-subtitle>
|
|
|
|
|
</mat-card-title-group>
|
|
|
|
|
</mat-card-header>
|
|
|
|
|
<mat-card-content>
|
|
|
|
|
<mat-card-subtitle>Image :</mat-card-subtitle>
|
|
|
|
|
<img
|
|
|
|
|
mat-card-xl-image
|
|
|
|
|
*ngIf="recipe.image; else placeholder"
|
|
|
|
|
[src]="recipe.image"
|
|
|
|
|
alt="{{ recipe.name }}"
|
|
|
|
|
class="recipe-image"
|
|
|
|
|
/>
|
|
|
|
|
<ng-template #placeholder>
|
|
|
|
|
<img
|
|
|
|
|
mat-card-xl-image
|
|
|
|
|
src="https://placehold.co/500x500"
|
|
|
|
|
alt="Placeholder Image"
|
|
|
|
|
class="recipe-image"
|
|
|
|
|
/>
|
|
|
|
|
</ng-template>
|
|
|
|
|
<h2>Ingredients</h2>
|
|
|
|
|
<ul>
|
|
|
|
|
<li *ngFor="let ingredient of recipe.ingredients">
|
|
|
|
|