[style.background-image] doesnt work

HELLO GUYS


[style.background.image] = "myimage" doesnt work in IonTabs


<ion-tab [root]="tab4Root" tabIcon="profile" [style.background-image]="profilepiclinktrusted"></ion-tab>

TS File:

NativeStorage.getItem('loginprofilepicture').then( data => this.profilepiclink = data, error => this.profilepiclink = "http://server/profilepictures/profilepicturedefault.png");
this.profilepiclinktrusted = this.sanitizer.bypassSecurityTrustStyle('url('+ this.profilepiclink + ')');

No Error Outputs or Console Output. It only shows nothing but the tabs works.
I really need to set the background image in my html file and not in css file or something else because of many reasons that arent nessesary to the solution at the moment.

What do i wrong here?

any update on this? i really need this

You’re trying to use a sanitized url from storage in your code snippet. Did you try it with a normal asset as well? I.e. Does it work the way you intended it at all?