I load data from an API and bind the values i get into textfields which has a loop method on it. Secondly what i want to do is when the values are been shown on the page and i submit click is click, it should post all the values to the console.
API
this.http.get('http://localhost/scripts/test.php?year='+this.navparams.data.Quest_Year).map(res => res.json()).subscribe(data =>{
console.log(JSON.stringify(data));
this.items= data;
});
HTML
<div *ngFor="let item of items">
<ion-input type="text" [(ngModel)]="item.Quest_ID"></ion-input>
</div>
<button (click)="send()"> Sample</button>
JS
send(){
for(var i=0;i<this.test.length;i++) {
console.log(item.Quest_ID[i])
}
}