Angular 2& Ionic 2:访问Swiper幻灯片数据属性

时间:2016-11-21 15:42:13

标签: angular ionic-framework ionic2

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>为我提供了活动索引,但有没有办法获取数据属性?

0 个答案:

没有答案