本文整理汇总了TypeScript中ionic-angular.Loading.create方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Loading.create方法的具体用法?TypeScript Loading.create怎么用?TypeScript Loading.create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ionic-angular.Loading
的用法示例。
在下文中一共展示了Loading.create方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: openPage
openPage(page) {
// Reset the content nav to have just this page
// we wouldn't want the back button to show in this scenario
console.log(this.nav);
if(page === 'Ajustes'){
this.nav.push(Ajustes,{
"tit":'Ajustes',
"section":'Ajustes',
"translator":this.translator_object
});
}else if(page.idTypeItem === 1011){
if(this.platform.is('ios')){
InAppBrowser.open('https://itunes.apple.com/in/app/incidencias-velez-malaga/id990970923?mt=8','_system','location=yes');
}else if(this.platform.is('android')){
InAppBrowser.open('https://play.google.com/store/apps/details?id=com.gecor.VelezMalaga','_system','location=yes');
}
}else if(page.idTypeItem === 1015){
this.loading = Loading.create({content:''});
this.nav.present(this.loading);
setTimeout(() =>{
this.nav.push(page.component,{
"tit":this.translator_object[localStorage.getItem('lang')]['SELECCIONA_PLAYA'],
"section":this.pages[0].section,
"index":this.pages[0].idx,
"estados": this.estados,
"idTypeItem": page.idTypeItem,
"translator":this.translator_object,
"loading": this.loading,
"typeItems" : this.typeItems
});
},100)
}else{
this.loading = Loading.create({content:''});
this.nav.present(this.loading);
setTimeout(() =>{
this.nav.push(page.component,{
"tit":page.title,
"section":page.section,
"index":page.idx,
"estados": this.estados,
"idTypeItem": page.idTypeItem,
"translator":this.translator_object,
"loading": this.loading,
"typeItems" : this.typeItems
});
},100)
}
};
示例2: 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();
});
}
示例3: ionViewDidEnter
ionViewDidEnter() {
let loading = Loading.create({
content: 'Getting Jobs...'
});
this.navController.present(loading).then(() => {
this.storiesService.getJobStories()
.subscribe(
(data: any) => {
data.forEach((id: any) => {
this.storiesService.getStory(id)
.subscribe(
(data: any) => {
console.log(data);
this.jobs.push(data);
loading.dismiss();
},
(err: Error) => {
console.log(err);
}
);
});
},
(err: Error) => {
console.log(err);
}
);
});
}
示例4: btnSearchByIdOrder
btnSearchByIdOrder() {
let loading = Loading.create({
content: "Buscando...",
});
this.nav.present(loading);
this.callService.searchByIdOrder(this.idOrder).subscribe(
data => {
console.log('si');
loading.dismiss();
if (data.doc.length > 0) {
this.details = data.doc;
} else {
let toast = Toast.create({
message: 'No hay resultados, intente con otro "numero de orden", o revise que este bien escrito el "numero de orden" que esta buscando',
duration: 10000,
position: 'bottom',
showCloseButton: true,
closeButtonText: 'ok'
});
this.nav.present(toast);
}
},
err => {
loading.dismiss();
console.log('no');
},
() => {
loading.dismiss();
console.log('Search Complete');
this.idOrder = '';
}
);
}
示例5: getCurrentLocation
getCurrentLocation(): Observable<google.maps.LatLng> {
let loading = Loading.create({
content: 'Locating...'
});
this.nav.present(loading);
let options = {timeout: 10000, enableHighAccuracy: true};
let locationObs = Observable.create(observable => {
Geolocation.getCurrentPosition(options)
.then(resp => {
let lat = resp.coords.latitude;
let lng = resp.coords.longitude;
let location = new google.maps.LatLng(lat, lng);
console.log('Geolocation: ' + location);
observable.next(location);
loading.dismiss();
},
(err) => {
console.log('Geolocation err: ' + err);
loading.dismiss();
})
})
return locationObs;
}
示例6: searchForMovie
searchForMovie(searchbar) {
var q = searchbar.value;
if (q.trim() == '') {
this.movieService
.getAllMovies()
.then(data => {
this.movies = data;
})
} else {
let loading = Loading.create({ content: "Searching for movies..." });
this.navController.present(loading);
this.movieService
.searchForMovie(q)
.then(data => {
loading.dismiss();
this.movies = data;
})
}
}
示例7: showLoading
/**
* shows simple html content loading overlay
*/
showLoading() {
let loading = Loading.create({
content: "<h4>Loading</h4> content <small style='color: red;'>with</small> html <b>TAGS</b>",
duration: 3000
});
this.nav.present(loading);
}
示例8: fillStories
private fillStories() {
let loading = Loading.create({
content: 'Getting Stories...',
});
this.nav.present(loading).then(() => {
this.stories = [];
this.storiesService.getStories()
.subscribe(
(stories: any[]) => {
for (let i = 0; i < 20; i++) {
let id = stories[i];
this.storiesService.getStory(stories[i])
.subscribe(
(data: any) => {
this.stories.push({ data: data, id: id });
loading.dismiss();
this.storiesRetreived = this.stories;
}
);
}
},
(err: Error) => console.error(err)
);
});
}
示例9: resetPassword
resetPassword(credentials) {
let loading = Loading.create({
content: "Please wait.."
});
this.navCtrl.present(loading);
let ref = this;
// this.ref.resetPassword({
// email: credentials.email
// }, function(error) {
// if (error) {
// switch (error.code) {
// case "INVALID_USER":
// ref.error = "Este usuário não existe.";
// break;
// default:
// ref.error = error;
// break;
// }
// loading.dismiss();
// } else {
// ref.error = "Em breve você irá receber um e-mail com uma nova senha temporária.";
// loading.dismiss();
// }
// });
}
示例10: presentLoading
presentLoading() {
let loading = Loading.create({
content: "Please wait...",
duration: 3000
});
this.nav.present(loading);
}