How to save statement input Angular?
问题 <tr *ngFor="let item of items"> <td>{{ item.id }}</td> <td>{{ item.name }}</td> <td>{{ item.score }}</td> <td><input size="7" /></td> </tr> Where items in array of objects that is received from server each 5 seconds. Problem is if fill inputs <input size="7" /> it will be replaced after next rendering. How to save the statement of these inputs? 回答1: Angular will recreate DOM elements when items in a collection are changed and rendered via *ngFor . By default, Angular will track how items are