当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript ionic-angular.Slides类代码示例

本文整理汇总了TypeScript中ionic-angular.Slides的典型用法代码示例。如果您正苦于以下问题:TypeScript Slides类的具体用法?TypeScript Slides怎么用?TypeScript Slides使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Slides类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: ionViewDidEnter

  /**
   * This method will be invoked everytime when come back.
   */
  public ionViewDidEnter(): void {
    // Just set it again. <!! DO NOT REMOVE THIS LINE !!>
    this.selectedVehicle = this.appState.userSelectedVehicle;

    if (this.userVehicleList && this.userVehicleList.length && this.selectedVehicle) {
      // This will make Slides move to Selected vehicle.
      const vehicleIndex = this.userVehicleList.indexOf(this.selectedVehicle);
      this.vehicleSlide.slideTo(vehicleIndex || 0);
    }
  }
开发者ID:PoompisekK,项目名称:myWork,代码行数:13,代码来源:select-car.page.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: 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

示例4: 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

示例5: switchSlide

 switchSlide(index) {
     this.slide = index;
     this.slides.slideTo(index);
     if (this.isMessagesOpened) {
         this.isMessagesOpened = false;
     }
 }
开发者ID:qwb0920,项目名称:birdchain-mvp,代码行数:7,代码来源:layout.component.ts

示例6: Date

        this.platform.registerBackButtonAction(() => {
            if (this.isMessagesOpened) {
                this.isMessagesOpened = false;
                return;
            }
            if (this.navPath.length < 1) {
                if (new Date().getTime() - lastTimeBackPress < timePeriodToExit) {
                    this.platform.exitApp();
                } else {
                    let toast = this.toastCtrl.create({
                        message:  'Press back again to exit',
                        duration: 3000,
                        position: 'bottom'
                    });
                    toast.present();
                    lastTimeBackPress = new Date().getTime();
                }
                return;
            }

            this.navPath.pop();
            this.slide = this.navPath[this.navPath.length - 1];
            this.slides.slideTo(this.slide);
            this.isGoingBack = true;
        });
开发者ID:qwb0920,项目名称:birdchain-mvp,代码行数:25,代码来源:layout.component.ts

示例7: 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

示例8: 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

示例9: 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

示例10: ionViewDidEnter

 ionViewDidEnter() {
   this.slides.update();
 }
开发者ID:interdate,项目名称:SheDate-Android,代码行数:3,代码来源:arena.ts


注:本文中的ionic-angular.Slides类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。