本文整理匯總了TypeScript中ionic-angular.Config.set方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Config.set方法的具體用法?TypeScript Config.set怎麽用?TypeScript Config.set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ionic-angular.Config
的用法示例。
在下文中一共展示了Config.set方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
.then(data => {
this.response = data;
if(this.response.hash){
this.config.set('HASH', this.response.hash);
this.local.set('HASH', this.response.hash);
this.local.set('AUTHORIZED', true);
this.nav.setRoot(LeaderPage);
} else {
this.codeIncorrect('Error.', this.response.error.message);
}
});
示例2: if
.then(data => {
this.response = data;
if(this.response.hash) {
this.config.set('HASH', this.response.hash);
this.local.set('HASH', this.response.hash);
this.local.set('AUTHORIZED', true);
if(this.response.is_homestay) {
this.config.set('HOMESTAY', true);
this.config.set('MENTOR', false);
this.local.set('HOMESTAY', true);
this.local.set('MENTOR', false);
this.nav.setRoot(HomestayPage);
} else {
this.config.set('HOMESTAY', false);
this.config.set('MENTOR', true);
this.local.set('HOMESTAY', false);
this.local.set('MENTOR', true);
this.nav.setRoot(MentorPage);
}
} else if(this.response.error){
this.codeIncorrect('Error.', this.response.error.message);
}
});
示例3:
.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('Password error', 'Please try again later');
this.loginCodeCorrect = false;
}
this.isHandling = false;
loading.dismiss();
});
示例4:
this._translateService.get("BACK").subscribe((res: string) => {
this._config.set("ios", "backButtonText", res);
});
示例5:
this.translate.get("BACK_BUTTON").subscribe(back => {
this.config.set("ios", "backButtonText", back);
});
示例6: gotoMediaList
gotoMediaList(params) {
this.config.set('backButtonText', params.mainTitle);
this.navController.push(MediaListPage, params);
}
示例7: gotoSubcategoryList
gotoSubcategoryList(params) {
this.config.set('backButtonText', params.mainTitle);
this.navController.push(SubcategoryListPage, params);
}