异步管道内的自定义管道

时间:2017-12-14 06:52:59

标签: html5 asynchronous pipe ionic3

我正在尝试在Ionic 3中的异步管道的ngFor循环中使用自定义管道。

  <ion-list>
    <ion-item *ngFor="let item of items | async" (click)="openItem(item)">
      <ion-thumbnail item-start>
          <img src={{item.avatar|changeAvatar}}>
      </ion-thumbnail>
      <p>{{item.name}}</p>
    </ion-item>
  </ion-list>

这给了我以下错误。

Error: Template parse errors:
The pipe 'changeAvatar' could not be found ("items | async" (click)="openItem(item)">

我做错了吗?

0 个答案:

没有答案