File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1- import { Component } from '@angular/core' ;
1+ import { Component , AfterContentInit } from '@angular/core' ;
22import { Alert , AlertController , NavController } from 'ionic-angular' ;
33import { PhoneService } from '../../services/phone' ;
44import { VerificationPage } from '../verification/verification' ;
@@ -7,7 +7,7 @@ import { VerificationPage } from '../verification/verification';
77 selector : 'login' ,
88 templateUrl : 'login.html'
99} )
10- export class LoginPage {
10+ export class LoginPage implements AfterContentInit {
1111 private phone = '' ;
1212
1313 constructor (
@@ -16,6 +16,12 @@ export class LoginPage {
1616 private navCtrl : NavController
1717 ) { }
1818
19+ ngAfterContentInit ( ) {
20+ this . phoneService . getNumber ( )
21+ . then ( ( phone ) => this . phone = phone )
22+ . catch ( ( e ) => console . error ( e . message ) ) ;
23+ }
24+
1925 onInputKeypress ( { keyCode} : KeyboardEvent ) : void {
2026 if ( keyCode === 13 ) {
2127 this . login ( ) ;
You can’t perform that action at this time.
0 commit comments