I want hide ion-row if value == null
I use this code but it dose not work
<ion-row ng-show="item.Sex!= null">
<ion-col col-6>
<h5 class="title">Porn Date</h5>
</ion-col>
<ion-col col-2>
<h5 class="data">{{ item.Sex}}</h5>
</ion-col>
</ion-row>
here the response list data
DayAfterPorn:null
Expected: null
Id:2
IsBuy:false
IsDead:false
IsDeleted: false
Num : 2
Sex: null## Heading ##
Why ng show dose not work even value == null
You should use like !item.Porn
<ion-row ng-show="!item.Porn">
You can use ng-show="item.Porn" or [hidden]="!item.Porn"
I hope this will help/guide to you/others.
If you are using ionic 1+ version
<ion-row ng-show="item.Porn">
<ion-col col-6>
<h5 class="title">Porn Date</h5>
</ion-col>
<ion-col col-2>
<h5 class="data">{{ item.Porn }}</h5>
</ion-col>
</ion-row>
If you are using ionic 3 version
<ion-row [hidden]="!item.Porn">
<ion-col col-6>
<h5 class="title">Porn Date</h5>
</ion-col>
<ion-col col-2>
<h5 class="data">{{ item.Porn }}</h5>
</ion-col>
</ion-row>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With