Created
March 1, 2018 22:50
-
-
Save jeffersonchaves/eac0be9b541d1a33513a342b02f1e245 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#TESTE 1: assim funciona .then((result:any)=>{ | |
this.userProvider.createAccount(this.model.email, this.model.password).then((result:any)=>{ | |
this.toast.create({ message: 'sucesso. Token: ' + result.token, position: 'bottom', duration: 2000 }).present(); | |
}).catch( ); | |
#TESTE 2: usando funcao anonima ao inves de arrow function nao funciona .then(function(result:any) { | |
this.userProvider.createAccount(this.model.email, this.model.password).then(function(result:any) { | |
this.toast.create({ message: 'sucesso. Token: ' + result.token, position: 'bottom', duration: 2000 }).present(); | |
}).catch( ); | |
#TESTE 3: mas, assim funciona | |
let test = this.toast.create({ message: 'sucesso. Token: ?', position: 'bottom', duration: 2000 }); | |
this.userProvider.createAccount(this.model.email, this.model.password).then(function(result:any) { | |
test.present(); | |
}).catch( ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment