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.


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

Did you find a solution ?
I have same problem


I deal with this solution

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

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;">