Hiding an item using ngClass expression in Ionic using Angular

Viewed 138

I'm trying to apply ion-hide class to ion-col. For some reason, it is not applying when I try to use ngClass. Could anyone please help?

<ion-col [ngClass]="{ 'ion-hide': !flag }">
  <div>Content</div>
</ion-col>
1 Answers

use this syntax:

<ion-col [class.ion-hide]="!flag">
  <div>Content</div>
</ion-col>
Related