Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<div class="container">
<div class="page-header">
<h1 class="text-danger text-center">Foo T-Shirt Company</h1>
</div>
<hr />
<br />
<div class="row">
<div class="col-md-7">
<div *ngFor="let t of tshirts" class="card mb-3" style="max-width: 540px;">
<div class="row no-gutters">
<div class="col-md-4">
<img (mouseenter)='t.imggsrc = t.bimage' (mouseleave)='t.imggsrc = t.fimage' [src]="t.imggsrc || t.fimage"
class="card-img" alt="...">
</div>
<div class="col-md-8">
<div class="card-body">
<h5 class="card-title">{{t.name}}</h5>
<p class="card-text">{{t.description}}</p>
<div class="card-text alert alert-success" role="alert">
Price : {{t.price}}
</div>
<div class="row">
<div class="col-md-7">
<button [disabled]="buyButton" class="btn btn-danger" (click)='addtocart(t)'>Add to Cart</button>
</div>
<div class="col-md-5">
Quantity :<span [style.color]="t.quanity < 25 ? 'blue' : 'red'">{{t.quanity}}</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-5">
<app-child *ngIf="showDetails" (buyevent)='update($event)' (cancelevent)='cancel($event)'
[tshirt]='tshirtdetails'></app-child>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.