I am making a request, and I am expecting a return, however it is asynchronous, it may take time or not, in my case I just want to display a message on the screen.
Hours it sends undefined
and hours returns me the correct message.
Do I need to make sure this message exists how to do this?
this.loginprovider.validaLogin(user).subscribe(data => this.response = data);
if(!this.response.sucesso){
this.showAlert("ERROR!",this.response.mensagem);
}
How to have this contest?
One detail:
I'm developing a hybrid app using the latest version of ionic (ionic 3) and angular (angle 4);