本文整理汇总了TypeScript中ionic-angular.Loading类的典型用法代码示例。如果您正苦于以下问题:TypeScript Loading类的具体用法?TypeScript Loading怎么用?TypeScript Loading使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Loading类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: loginUser
loginUser(){
if (!this.loginForm.valid){
console.log(this.loginForm.value);
} else {
this.authData.loginUser(this.loginForm.value.email, this.loginForm.value.password).then( authData => {
this.nav.setRoot(HomePage);
}, error => {
let alert = Alert.create({
message: error.message,
buttons: [
{
text: "Ok",
role: 'cancel'
}
]
});
this.nav.present(alert);
});
let loading = Loading.create({
dismissOnPageChange: true,
});
this.nav.present(loading);
}
}
开发者ID:aymenlaadhari,项目名称:GerTunMobPactIonic,代码行数:25,代码来源:login.ts
示例2: presentLoadingDefault
presentLoadingDefault() {
this.loading = Loading.create({
content: 'Please wait...'
});
this.navCtrl.present(this.loading);
}
开发者ID:artman202,项目名称:tangent-app,代码行数:7,代码来源:login.ts
示例3: hideLoading
public hideLoading(): Promise<any> {
return (this.loading && this.loading.dismiss().then(() => {
this.loading = null;
})) || new Promise((resolve, reject) => resolve({})).then(() => {
this.loading = null;
});
}
开发者ID:PoompisekK,项目名称:myWork,代码行数:7,代码来源:app-loading.service.ts
示例4: validateLoginCode
validateLoginCode() {
let loading = Loading.create({
content: "正在查找...",
});
this.nav.present(loading);
this.loginService.validateLoginCode(this.loginCode)
.then(data => {
this.response = data;
if(this.response.hash){
this.firstName = this.response.first_name;
this.lastName = this.response.last_name;
this.loginCodeCorrect = true;
this.config.set('HASH', this.response.hash);
this.local.set('HASH', this.response.hash);
} else {
this.firstName = "";
this.lastName = "";
this.codeIncorrect('密码错误', '请确认后重试');
this.loginCodeCorrect = false;
}
this.isHandling = false;
loading.dismiss();
});
}
开发者ID:eongoo,项目名称:leader,代码行数:26,代码来源:login.ts
示例5: register
register(email, password){
let loading = Loading.create({
content: 'Criando usuário...' ,
dismissOnPageChange: true
});
this._navController.present(loading);
var $this = this;
this.angularFire.auth.createUser({
email: email,
password: password
}).then(function(userData){
loading.dismiss();
$this._viewController.dismiss();
}, function(error){
loading.dismiss();
console.error('Erro', error);
let alert = Alert.create({
title: 'Ops :(',
subTitle: 'Não consegui te cadastrar, tente mais tarde !',
buttons: ['OK']
});
$this._navController.present(alert);
});
}
开发者ID:mateusmcg,项目名称:tv-show-reminder-app,代码行数:27,代码来源:register-modal.ts
示例6: startLoading
startLoading(loadingCtrl: LoadingController)
{
this.loading = loadingCtrl.create({
content: '请稍候...'
});
this.isLoading = true;
this.loading.present();
}
开发者ID:qwb0920,项目名称:ionic2-GGDream,代码行数:8,代码来源:ISSPage.ts
示例7:
.catch ( (err: AuthError) => {
console.log(err);
this.analytics.trackEvent('Login', 'Submit', 'Failed');
this.loading.dismiss().then( () => {
if (err) {
if (err.message === 'passwordExpired') {
this.updatePassword(user.value.email, user.value.password)
.then(() => {
console.log('UpdatePassword resolved');
this.navCtrl.setRoot('HomePage');
})
.catch(() => {
console.log('UpdatePassword rejected');
});
return;
}
const alert = this.alertCtrl.create({
message: this.translateService.instant(err.message),
buttons: [
{
text: 'Ok',
role: 'cancel'
}
]
});
alert.present();
}
});
});
开发者ID:meumobi,项目名称:infomobi,代码行数:29,代码来源:login.ts
示例8: loginUser
loginUser(){
if (!this.loginForm.valid){
console.log(this.loginForm.value);
} else {
this.authData.loginUser(this.loginForm.value.email, this.loginForm.value.password)
.then( authData => {
this.navCtrl.setRoot(HomePage);
}, error => {
this.loading.dismiss().then( () => {
let alert = this.alertCtrl.create({
message: error.message,
buttons: [
{
text: "אישור",
role: 'ביטול'
}
]
});
alert.present();
});
});
this.loading = this.loadingCtrl.create({
dismissOnPageChange: true,
});
this.loading.present();
}
}
开发者ID:aviel829,项目名称:aroume,代码行数:28,代码来源:login.ts
示例9: if
this.events.subscribe('wordpress:savestatus', (state) => {
console.log(state);
if (state.state === 'saving') {
this.loader.present();
console.log('saving');
}
else if (state.state === 'error') {
this.loader.dismiss();
this.createLoader();
this.toastCtrl.create({ message: 'Error Saving Report', duration: 3000 }).present();
}
else if (state.state === 'finished') {
this.loader.dismiss();
this.createLoader();
console.log('finished');
}
});
开发者ID:qwb0920,项目名称:wp-rest-api-ionic2,代码行数:17,代码来源:report.ts
注:本文中的ionic-angular.Loading类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论