@flycoders_sourav wrote:
When I try to get value form text box and print its showing undefined how can i fix this issues
Html
<ion-content> <div class="logo-box"> <h4 class="sign-head">Sign In</h4> <img src="../../assets/images/logo2.png" alt="" /> <h4>A whole business store <br> at your fingertips</h4> </div> <ion-grid> <ion-row justify-content-center> <ion-col align-self-center size-md="6" size-lg="5" size-xs="12"> <div padding> <ion-item class="form-group frm"> <ion-icon name="call" class="input-icon"></ion-icon> <ion-input [(ngModel)]="email" type="text" class="info-frm" placeholder="Phone No"></ion-input> </ion-item> <ion-item class="form-group frm"> <ion-icon name="unlock" class="input-icon"></ion-icon> <ion-input type="password" [(ngModel)]="password" class="info-frm" placeholder="Password" ></ion-input> </ion-item> </div> <div class="reg-btn"> <button type="submit" size="large" expand="block" class="btn sing-btn" (click)="doLogin();">SIGN IN</button> <!-- <button type="submit" routerLink="/welcome" size="large" expand="block" class="btn sing-btn">SIGN IN</button> --> <p class="forgot"> <span><a routerLink="/otpverify">Forgot Password ?</a></span> <span class="regi"><a routerLink="/register">Register Now</a></span> </p> </div> hi {{email}} </ion-col> </ion-row> </ion-grid> </ion-content>
.ts
doLogin():void{ alert('its click') console.log(this.email,this.password) }
Posts: 1
Participants: 1