我尝试将一些值插入数组中。我的方法需要一段时间而且速度不快
let activity= {} as IActivity;
activity.firstValue=this.firstValue;
activity.secondtValue=this.secondValue;
activity.thirdValue=this.thirdValue;
activity.fourthValue= this.fourthValue;
this.listOActivity = [] as IActivity[];
this.listOfDocument.unshift(activity);
html:
<input type="text" [(ngModel)]="firstValue"></input>
<ion-input type="text" [(ngModel)]="secondValue"></ion-input>
<ion-input type="text" [(ngModel)]="thirdValue"></ion-input>
<ion-input type="text" [(ngModel)]="fourthValue"></ion-input>
还有其他解决方案可以更快吗?