Created
June 8, 2017 20:54
Star
You must be signed in to star a gist
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
login() { | |
let loading = this.loadingCtrl.create({ | |
content: 'Please wait...' | |
}); | |
loading.present(); | |
let details = this.loginDetails; | |
console.log('login..'); | |
this.user.login(details.username, details.password).then((result) => { | |
console.log('result:', result); | |
loading.dismiss(); | |
this.navCtrl.setRoot(TabsPage); | |
}).catch((err) => { | |
if (err.message === "User is not confirmed.") { | |
loading.dismiss(); | |
this.navCtrl.push(ConfirmPage, { 'username': details.username }); | |
} | |
console.log('errrror', err); | |
loading.dismiss(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment