Skip to content

Commit

Permalink
Step 7.26: Use profile component in verification page
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha authored and darkbasic committed Oct 16, 2017
1 parent fe2c0e1 commit dbb0067
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pages/verification/verification.ts
@@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { AlertController, NavController, NavParams } from 'ionic-angular';
import { PhoneService } from '../../services/phone';
import { ProfilePage } from '../profile/profile';

@Component({
selector: 'verification',
Expand Down Expand Up @@ -28,7 +29,11 @@ export class VerificationPage implements OnInit {
}

verify(): void {
this.phoneService.login(this.phone, this.code)
this.phoneService.login(this.phone, this.code).then(() => {
this.navCtrl.setRoot(ProfilePage, {}, {
animate: true
});
})
.catch((e) => {
this.handleError(e);
});
Expand Down

0 comments on commit dbb0067

Please sign in to comment.