Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created June 8, 2017 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthieu-D/4027ba9810a6942220d3423e71d3f474 to your computer and use it in GitHub Desktop.
Save matthieu-D/4027ba9810a6942220d3423e71d3f474 to your computer and use it in GitHub Desktop.
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