我已经加载了这段加速缓慢的离子代码:
ionViewWillEnter(){
this.morePagesAvailable = true;
let loading = this.loadingCtrl.create();
loading.present();
this.post = this.navParams.get('item');
Observable.forkJoin(
this.getAuthorData(),
this.getCategories())
.subscribe(data => {
this.user = data[0].name;
this.categories = data[1];
loading.dismiss();
});
}
getAuthorData(){
return this.wordpressService.getAuthor(this.post.author);
}
getCategories(){
return this.wordpressService.getPostCategories(this.post);
}
wordpressService是来自REST API的getter。有人可以帮帮我吗?
谢谢, 罗热