Ionic class ng class ngif not working ionic4


#1

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>



#2

only after click on screen I see…


#3

this must be

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