<button class="alt-button" ion-item detail-none (click)="goToAbout()" clear small >
<ion-icon name='person' item-left></ion-icon>About us</button>
Buttonaktionionic2 Set Cache Ansicht, wenn die Schaltfläche Auslösen
goToAbout() {
this.menu.close();
// close the menu and Goto About page
this.app.getRootNav().push(AboutPage);
}
api Anruf
ionViewDidLoad(){
this.loading.present();
this.aboutservice.getPost().then(
response => {
this.items = response
this.loading.dismiss();
},
error=>{
this.error = error
this.showError('There was problem with server');
this.loading.dismiss();
});
}
es lädt die api Daten jedes Mal, aber ich möchte einmal api Daten laden und derselben Taste Aktion, die ich für sideMenu verwendet habe, funktioniert es gut. bitte geben Sie eine Idee.
wo ist der api call code? – Sampath
ich habe den code –
aktualisiert ich habe den api call in construtor gestellt, immer noch loading erscheint –