Change dynamic background ion content IONIC-4

I cant change dynamic background ion content IONIC-4.
I want use this:
<ion-content no-padding fullscreen [ngStyle]="{‘background’:'linear-gradient(to bottom, #4e4f52 0%,#191414 ’ + porcentage + ‘%)’}" >

But this not works.
I know that I can change the background in ion content with --background, but I need dynamic.

Thanks

@iphaco were you able to solve this problem? I’m looking for something similar

Hi
Did you find a solution ?
I have same problem

Thank

Hi
I deal with this solution

<ion-content>
<div [style.background-color]="user.background" [style.height]="'100%'">
</div>
</ion-content>

Check our Variables Set By JavaScript section. They also have a list of all variables that you can target for each of their web components. I have been able to dynamically theme my entire app.

Solved using this code

<ion-content style="--background: {{classobject.color_name_or_code}};--ion-text-color: #000;">
</ion-content>