离子输入提出自动创建问题(Ionic Input filed auto create issue)
林使用Ionic 3为我的移动应用程序,我试图创建时,我想在自动创建下一个字段后输入字段上的东西,但它不适合我,任何人都知道如何正确地做到这一点
HTML
<ion-input type="text" placeholder="name" right (keyup.enter)="nextfiled()" ></ion-input>.TS
nextfiled(value: string): void { alert('Submitted value: ' + value); }Im used Ionic 3 for a my mobile application, Im tried to create when I type something on the input filed after want to auto create next filed , but its not work for me, anyone know how to do that correctly
html
<ion-input type="text" placeholder="name" right (keyup.enter)="nextfiled()" ></ion-input>.ts
nextfiled(value: string): void { alert('Submitted value: ' + value); }最满意答案
尝试这个:
html的
<ion-item *ngFor="let item of textBox"> <ion-input type="text" placeholder="name" [(ngModel)]="item.one" (keypress)="addTextBox($event.keyCode)"></ion-input> </ion-item>.TS
textBox:any = [{one:''}]; addTextBox(ev){ console.log('isScroll',ev); if (ev == 13) { this.textBox.push({one:''}); } }Try this:
.html
<ion-item *ngFor="let item of textBox"> <ion-input type="text" placeholder="name" [(ngModel)]="item.one" (keypress)="addTextBox($event.keyCode)"></ion-input> </ion-item>.ts
textBox:any = [{one:''}]; addTextBox(ev){ console.log('isScroll',ev); if (ev == 13) { this.textBox.push({one:''}); } }更多推荐
type,value,Ionic,create,nextfiled,电脑培训,计算机培训,IT培训"/> <meta name=&
发布评论