本文整理汇总了TypeScript中ionic-angular.Slides.getActiveIndex方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Slides.getActiveIndex方法的具体用法?TypeScript Slides.getActiveIndex怎么用?TypeScript Slides.getActiveIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ionic-angular.Slides
的用法示例。
在下文中一共展示了Slides.getActiveIndex方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: goToSlide
goToSlide(str) {
let user = this.users[this.slides.getActiveIndex()];
let index = this.slides.getActiveIndex();
if (str == 'like') {
let params = JSON.stringify({
toUser: user.id,
});
this.http.post(this.api.url + '/user/like/' + user.id, params, this.api.setHeaders(true)).subscribe(data => {
});
this.users.splice(index, 1);
this.slides.slideTo(index,1);
} else {
if (this.slides.isEnd()) {
//this.slides.slideNext();
//var that = this;
//setTimeout(function () {
this.slides.slideTo(0,1);
//this.slides.update();
//}, 10);
} else {
this.slides.slideNext();
}
}
}
示例2: slideChanged
slideChanged(event) {
if(this.slides.getActiveIndex() == 1){
console.log(this.users[this.slides.getActiveIndex()]);
console.log(this.slides.getActiveIndex());
}
}
示例3: toProfile
toProfile() {
let user = this.users[this.slides.getActiveIndex()];
this.navCtrl.push(ProfilePage, {
user: user
});
console.log('USER: ' + JSON.stringify(user));
}
示例4: slidePrev
private slidePrev(): void {
this.slides.lockSwipes(false);
if (this.currentIndex == 0) this.navCtrl.pop();
else {
this.slides.slidePrev();
this.currentIndex = this.slides.getActiveIndex();
}
this.slides.lockSwipes(true);
}
示例5: onSlideChanged
onSlideChanged() {
this.slide = this.slides.getActiveIndex();
if (this.isMessagesOpened) {
this.isMessagesOpened = false;
}
if (this.isGoingBack) {
this.isGoingBack = false;
return;
}
this.navPath.push(this.slide);
}
示例6: slideNext
public slideNext(reset: boolean): void {
if (reset) {
this.resetGame();
}
if (this.currentIndex == 1 && !this.mnemonicHasPassphrase)
this.finalStep();
else {
this.slides.lockSwipes(false);
this.slides.slideNext();
}
this.currentIndex = this.slides.getActiveIndex();
this.slides.lockSwipes(true);
}
示例7: toProfile
toProfile() {
let user = this.users[this.slides.getActiveIndex()];
this.navCtrl.push(ProfilePage, {
user: user
});
}
示例8: toDialog
toDialog() {
let user = this.users[this.slides.getActiveIndex()];
this.navCtrl.push('DialogPage', {
user: user
});
}
示例9: slideChanged
public slideChanged(): void {
this.currentIndex = this.slides.getActiveIndex();
}
示例10: change
change(){
console.log( this.slides.getActiveIndex() );
}