Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular ng显示在ng重复中_Angular_Ionic3 - Fatal编程技术网

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>