Hi,
I have problem whit adding a background image dynamically to toolbar.
I try whit:
HTML
<ion-toolbar [ngStyle]="mainBackground" [ngClass]="color == 53 ? 'pet' : 'not-pet'" class="single-header-bg">
TS:
this.mainBackground: {
background: 'url(' image/url ')',
}
This returns
but i need to get --background, i try to insert in to TS --background but then it doesn’t appear at all.
2.
HTML
<ion-toolbar [style.background]="bgImage" [ngClass]="color == 53 ? 'pet' : 'not-pet'" class="single-header-bg">
TS
this.bgImage = 'url(' image/url ')',
This doesn’t return nothing, i just see on web some one make this work for a background-color.
Thank you for your help