Angular ng显示在ng重复中
如果Angular ng显示在ng重复中,angular,ionic3,Angular,Ionic3,如果value==null 我使用这个代码,但它不起作用 <ion-row ng-show="item.Sex!= null"> <ion-col col-6> <h5 class="title">Porn Date</h5> </ion-col> <ion-col col-2>
value==null
我使用这个代码,但它不起作用
<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>
为什么ng show即使在
值==null时也不起作用
您应该使用like!物品。色情
<ion-row ng-show="!item.Porn">
您可以使用
ng show=“item.Porn”
或[隐藏]=“!item.Porn”
我希望这将对你/其他人有所帮助/指导
如果您使用的是爱奥尼亚1+版本
色情约会
{{item.Porn}
如果您使用的是爱奥尼亚3版
色情约会
{{item.Porn}
我使用*ngif隐藏elment
<ion-row ng-show="!item.Porn">
<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>
<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>