如何在离子卡列表中找到特定的卡片

时间:2018-02-27 05:15:38

标签: angular ionic-framework

如何表演"喜欢"从卡片列表中对特定行为采取行动。

html的

<ion-content>
<ion-card *ngFor="let content of contents">

<ion-item>
    <ion-avatar item-start>
      <img src="img/marty-avatar.png">
    </ion-avatar>
    <h2>Marty McFly</h2>
    <p>November 5, 1955</p>
  </ion-item>

  <img src="img/advance-card-bttf.png">

  <ion-card-content>
    <p>Wait a minute. Wait a minute, Doc. Uhhh... Are you telling me that you built a time machine... out of a DeLorean?! Whoa. This is heavy.</p>
  </ion-card-content>

  <ion-row>
    <ion-col>
      <button ion-button icon-left clear small>
        <ion-icon name="thumbs-up"></ion-icon>
        <div>Likes</div>
      </button>
    </ion-col>
    <ion-col>
      <button ion-button icon-left clear small>
        <ion-icon name="text"></ion-icon>
        <div>4 Comments</div>
      </button>
    </ion-col>
    <ion-col center text-center>
      <ion-note>
        11h ago
      </ion-note>
    </ion-col>
  </ion-row>
</ion-card>
</ion-content>

由于数组内容有多个项目,因此生成的卡片不止一个,我想从生成的卡片列表中选择一张特定的卡片。怎么做?

0 个答案:

没有答案