I need help populating multiple cards in the following way:
<mdl-card *ngFor="let product of templates" class="demo-card-event" mdl-shadow="2" [ngStyle]="{ 'background-color': 'lightgray' }">
<mdl-card-title mdl-card-expand>
<h4>
{{product.name}}
</h4>
</mdl-card-title>
<mdl-card-actions mdl-card-border>
<button mdl-button mdl-colored mdl-ripple (click)="booknow()">
Show
</button>
<mdl-layout-spacer></mdl-layout-spacer>
<mdl-icon>event</mdl-icon>
</mdl-card-actions>
</mdl-card>
The CSS currently changes the background color dynamically to lightgrey, but I want to apply
background: url(-- here I want product.img --)
. Each object in my templates array has a property called img which contains a URL.
How can I update my code to achieve this?