Event problem


#1

ionViewDidEnter() {
this.webservice.buscaDesconto(this.usuario)
.then((data) => {
this.descontoavista = data.LIMITE_DSCTO_VISTA;
this.descontoaprazo = data.LIMITE_DSCTO_PRAZO;
this.database.presentToast(this.descontoavista);
this.database.presentToast(this.descontoaprazo);
})
}
I need to run this code every time I enter the page but the event is not working. If I leave the page and come back again it does not work anymore


#2

ionViewDidEnter fires when a page is enter, but it won’t fire if you came back from a previous push page.
I think you can use ionViewWillEnter to this purpose, it will fire every time your view going to be enter, even if you go back from a previous push page


#3

ionViewWillEnter not work…


#4

I test it, and ionViewWillEnter event fires for me, can you explain more the steps you do?