I have this
<ul>
<li *ngFor="let data of list">
//here bind a textbox to the id and get its value so something like
<input type="text" /> //am stuck
</li>
export class App {
textboxvalues:any[] = [];
list= [{
id: 1,
value: 'One'
},
{
id: 2,
value: 'Two'
}];
}
How can i bind both the value and id of textboxes such that when i collect the value of
console.log(textboxvalue)
it provides {id, value} eg
{1:"textbox1", 2:"textbox2"}
Or even as an object
{1, "textbox1"}, {2, "textbox2"}