after many attempts i gave up , i'm trying to make the inputs when the user put one number on there switch to the next input and if reached the last one an action should be called to verify if it's right or wrong, also if the user clicks in an input he entered a number already on it the number should be editable so the user can edit the code if he entered it wrong...
<ion-content padding text-center>
<ion-icon name="arrow-back" class="backBtn" (click)="onPoping()"></ion-icon>
<h3>Verification Code</h3>
<h6>Enter the code you received via SMS</h6>
<ion-grid class="verification-code-wrap">
<ion-row>
<ion-col>
<ion-input type="number" min="0" max="9" maxlength="1"></ion-input>
</ion-col>
<ion-col>
<ion-input type="number" min="0" max="9" maxlength="1"></ion-input>
</ion-col>
<ion-col>
<ion-input type="number" min="0" max="9" maxlength="1"></ion-input>
</ion-col>
<ion-col>
<ion-input type="number" min="0" max="9" maxlength="1"></ion-input>
</ion-col>
</ion-row>
</ion-grid>
<button ion-button clear>Resend code</button>
</ion-content>
ts file
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
@IonicPage()
@Component({
selector: 'page-verify-number',
templateUrl: 'verify-number.html',
})
export class VerifyNumberPage {
container: number;
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
onPoping(){
this.navCtrl.pop();
}
}
i found a java script fiddle that can do half of the way but i can't implement it in my app , please help!