Ionic class ng class ngif not working ionic4

I’m two hours that I try ngclass with ionic 4 ngif class in all their forms I’m creating a mobile app but when the value changes from true to false nothing appears help me …

   condition:boolean;
myfunc(){
this.condition=true;
}
        <div class="flex-item-2" [ngClass]="this.qr.condition ? 'show' : 'hide'"></div>


only after click on screen I see…

this must be

<div class=“flex-item-2” [ngClass]=“condition ? ‘show’ : ‘hide’”></div>

1 Like