ng-container在ionic2组件“离子项目滑动”中不起作用

时间:2018-03-13 11:35:57

标签: html angular typescript ionic2

我正在尝试使用以下代码绑定ion-item-sliding ionic2组件中的多个条件:

<ion-item-sliding *ngFor="let member of members | async">
  <ng-container *ngIf="member?.info | async as info">
    <ng-container *ngIf="member?.status | async as status">
    <ion-item *ngIf="!status.deleted">
      {{info.email}} 
      <span class="status" *ngIf="member?.status | async as status">{{status.owner ? 'Owner' : status.guest ? 'Guest':'Admin'}}</span>
    </ion-item>
    <ion-item-options side="right" *ngIf="checkEmail(info.email) || status.owner">
      <button ion-button class="trash" color="danger" (click)="kickUser(member.$value)">
        <ion-icon name="trash"></ion-icon>
      </button>
      <button ion-button *ngIf="member?.status | async as status" (click)="changeRole(member.$value,status.guest)">
        {{status.guest ? 'Change to admin' : 'Change to guest'}}
      </button>
    </ion-item-options>
  </ng-container>
  </ng-container>
</ion-item-sliding>

我没有在屏幕上显示任何内容。那么如何使ng-container工作呢?

感谢。

0 个答案:

没有答案