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


TypeScript LoadingController.present方法代码示例

本文整理汇总了TypeScript中ionic-angular.LoadingController.present方法的典型用法代码示例。如果您正苦于以下问题:TypeScript LoadingController.present方法的具体用法?TypeScript LoadingController.present怎么用?TypeScript LoadingController.present使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ionic-angular.LoadingController的用法示例。


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

示例1: ionViewDidEnter

 ionViewDidEnter() {
   let loading = this.loading.create({
     content: 'Loading items...'
   });
   loading.present();
   setTimeout(() => {
     for (let i = 0; i < 30; i++) {
       this.items.push({ name: 'ionic' });
     }
     loading.dismiss();
   }, 3000);
 }
开发者ID:jgw96,项目名称:overlay-test,代码行数:12,代码来源:page1.ts

示例2: loadUsers

 loadUsers() {
   let loading = this.loading.create({});
   loading.present().then(() => {
     this.userService.getAll()
       .then(users => {
         this.users = users;
         loading.dismiss();
       }, (error) => {
         this.users = [];
         loading.dismiss();
       });
   });
 }
开发者ID:hewerthomn,项目名称:ionic2-template-tabs,代码行数:13,代码来源:users.ts

示例3: loadPhotos

 loadPhotos() {
   let loading = this.loading.create({});
   loading.present().then(() => {
     this.photoService.getAll(this.album.id)
       .then(photos => {
         loading.dismiss();
         this.photos = photos;
       }, (error) => {
         loading.dismiss();
         this.photos = [];
       });
   });
 }
开发者ID:hewerthomn,项目名称:ionic2-template-tabs,代码行数:13,代码来源:album.ts

示例4:

          handler: data => {
            console.log('Saved clicked');

            let loading = this.loadCtrl.create({
              content: "Getting songs..."
            });

            loading.present().then(() => {
              this.musicService.getFirstTracks(data.term).then((tracks) => {
                this.songs = tracks;
                loading.dismiss();
              });
            });

          }
开发者ID:jgw96,项目名称:Soundel,代码行数:15,代码来源:home.ts

示例5: login

  /** If already registered then login using the following function. Check firebase and login */
  login() {

    /** Show Loading till they login */
    let loading = this.loading.create({
      content: 'Please Wait..'
    });
    loading.present();

    /** check authentication from provider */
    this.auth.loginWithEmail(this.form).subscribe(response => {
      console.log(response);
      loading.dismiss();
    })

  }
开发者ID:vishalsrini,项目名称:ionicAngularLogin,代码行数:16,代码来源:login.ts

示例6: play

  private play(id: string, songName: string, duration: number): void {
    this.initSong.play();
    setTimeout(() => {
      this.initSong.pause();
    },50)
    let loading = this.loadCtrl.create({
      content: "Buffering..."
    });
    loading.present().then(() => {
      this.load(id, songName, duration).then((song) => {
        console.log(song);
        song.play();
        setTimeout(() => {
          loading.dismiss();
        }, 700)
      })

    });
  }
开发者ID:jgw96,项目名称:Soundel,代码行数:19,代码来源:home.ts

示例7: setTimeout

    setTimeout(() => {
      this.musicService.init();

      this.loggedIn = false;

      let loading = this.loadCtrl.create({
        content: "Getting songs..."
      });

      loading.present().then(() => {
        localforage.getItem("defaultSearch").then((value) => {
          if (value === null) {
            this.musicService.getFirstTracks("Tame Impala").then((tracks) => {
              this.songs = tracks;
              console.log(tracks);
              SC.stream(`/tracks/${tracks[0].id}`).then((player) => {
                this.initSong = player;
              })
              loading.dismiss();
            })
          }
          else {
            this.musicService.getFirstTracks(value).then((tracks) => {
              console.log(tracks);
              SC.stream(`/tracks/${tracks[0].id}`).then((player) => {
                this.initSong = player;
              })
              this.songs = tracks;
              loading.dismiss();
            })
          }
        })
      });

      this.toastOpen = false;
    }, 500)
开发者ID:jgw96,项目名称:Soundel,代码行数:36,代码来源:home.ts

示例8: doLogin

	doLogin() {
		let loading = this.loading.create({ content: "Iniciando Sesiรณn", duration: 10000 });
		loading.present();
		this.api.doLogin().then((data: any) => {
			if (!data.email) {
				let alert = this.alert.create({
					title: 'Error ' + data.status,
					subTitle: data._body,
					buttons: ['OK']
				});
				loading.dismiss();
				alert.present();
				return;
			}
			this.api.setData(this.api.data.username, this.api.data.password, this.api.data.url);
			this.api.user = data;
			this.api.saveUser(data);
			loading.dismiss();
			this.navCtrl.setRoot(Page1);
		}).catch((err) => {
			console.log(err);
			this.alert.create({ message: "Error al iniciar Session", buttons: ["OK"] }).present();
		});
	};
开发者ID:seedgabo,项目名称:siaphone,代码行数:24,代码来源:login.ts


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