I need to set this properties on my div:
background: url();
background-repeat: no-repeat;
background-size: cover;
background-position: center, center;
This is my div:
<div *ngFor="let orderItems of receiptItems;" class="order-article animated bounceInLeft">
<div class="order-img" [style.background]="'url('+ orderItems.product.img.url +')'" ></div>
<div class="order-title">
<p>{{orderItems.product.title}}</p>
</div>
</div>
As you can see guys I've set [style.background] url
but I don't know how to set rest of the attributes / multiple attributes..
Thanks Any kind of help would be great !
-------- EDIT:
<div *ngFor="let orderItems of receiptItems;" class="order-article animated bounceInLeft">
<div class="order-img" [ngStyle]="{'background':'url('+ orderItem.product.imgUrl +')', 'background-repeat':' no-repeat','background-size': 'cover;','background-position': 'center, center' }" ></div>
<div class="order-title">
<p>{{orderItems.product.title}}</p>
</div>
</div>
using ngStyle caused this:
attributes are not applied properly...