My Angular 2 / Ionic 2模板如下所示:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<div id="latest">
<div id="post">
<div class="post-image post-image-1"></div>
<div id="post-content">
<div class="post-title post-title-1"><a href="javascript:void">Link here</a></div>
<div id="post-date"></div>
</div>
</div>
<div id="post">
<div class="post-image post-image-2"></div>
<div id="post-content">
<div class="post-title post-title-2">NO LINK</div>
<div id="post-date"></div>
</div>
</div>
</div>
<div id="latest">
<div id="post">
<div class="post-image post-image-1"></div>
<div id="post-content">
<div class="post-title post-title-1">NO LINK</div>
<div id="post-date"></div>
</div>
</div>
<div id="post">
<div class="post-image post-image-2"></div>
<div id="post-content">
<div class="post-title post-title-2"><a href="javascript:void">Link here</a></div>
<div id="post-date"></div>
</div>
</div>
</div>
现在我想访问有效幻灯片<ion-slides #setSlider [options]="setSliderOptions" (ionDidChange)="onSetSlideChanged()">
<ion-slide [attr.data-timer]="exercise.sets[setNumber].pause">
{{timer}}
</ion-slide>
...
</ion-slides>
数据属性。
<ion-slide>
为我提供了活动索引,但有没有办法获取数据属性?