當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Slides.getActiveIndex方法代碼示例

本文整理匯總了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();
          }
      }
    }
開發者ID:interdate,項目名稱:SheDate-Android,代碼行數:34,代碼來源:arena.ts

示例2: slideChanged

    slideChanged(event) {
      if(this.slides.getActiveIndex() == 1){
          console.log(this.users[this.slides.getActiveIndex()]);

          console.log(this.slides.getActiveIndex());
      }
    }
開發者ID:interdate,項目名稱:SheDate-Android,代碼行數:7,代碼來源:arena.ts

示例3: toProfile

    toProfile() {
      let user = this.users[this.slides.getActiveIndex()];
      this.navCtrl.push(ProfilePage, {
          user: user
      });
        console.log('USER: ' + JSON.stringify(user));

    }
開發者ID:interdate,項目名稱:SheDate-iOS,代碼行數:8,代碼來源:arena.ts

示例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);
 }
開發者ID:bitjson,項目名稱:copay,代碼行數:9,代碼來源:backup-game.ts

示例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);
 }
開發者ID:qwb0920,項目名稱:birdchain-mvp,代碼行數:11,代碼來源:layout.component.ts

示例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);
  }
開發者ID:bitjson,項目名稱:copay,代碼行數:15,代碼來源:backup-game.ts

示例7: toProfile

 toProfile() {
   let user = this.users[this.slides.getActiveIndex()];
   this.navCtrl.push(ProfilePage, {
       user: user
   });
 }
開發者ID:interdate,項目名稱:SheDate-Android,代碼行數:6,代碼來源:arena.ts

示例8: toDialog

 toDialog() {
   let user = this.users[this.slides.getActiveIndex()];
   this.navCtrl.push('DialogPage', {
       user: user
   });
 }
開發者ID:interdate,項目名稱:SheDate-Android,代碼行數:6,代碼來源:arena.ts

示例9: slideChanged

 public slideChanged(): void {
   this.currentIndex = this.slides.getActiveIndex();
 }
開發者ID:bitjson,項目名稱:copay,代碼行數:3,代碼來源:tour.ts

示例10: change

 change(){
   console.log( this.slides.getActiveIndex() );
 }
開發者ID:edu2act,項目名稱:course-hybrid-app-development,代碼行數:3,代碼來源:about.ts


注:本文中的ionic-angular.Slides.getActiveIndex方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。