Created
June 8, 2017 21:05
-
-
Save matthieu-D/4027ba9810a6942220d3423e71d3f474 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
signup() { | |
let loading = this.loadingCtrl.create({ | |
content: 'Please wait...' | |
}); | |
loading.present(); | |
let details = this.userDetails; | |
this.error = null; | |
console.log('register'); | |
this.user.register(details.username, details.password, {'email': details.email}).then((user) => { | |
console.log('hooray', user); | |
loading.dismiss(); | |
this.navCtrl.push(ConfirmPage, { username: details.username }); | |
}).catch((err) => { | |
loading.dismiss(); | |
this.error = err; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment