Say you have a list of tasks which in turn has a list of subtasks and you want the subtasks to be changable - How come that angular doesn't properly two-way bind the data for the subtask?
HTML
<div *ngFor="let task of tasks">
Task value: <input [(ngModel)]="task.value">
<br>
<div *ngFor="let subtask of task.subtasks">
Subtask: <input [(ngModel)]="subtask">
</div>
</div>
{{ tasks | json }}
TS
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: [ './app.component.css' ]
})
export class AppComponent {
tasks = [{
value: 'Task 1',
subtasks: ['Hello']
}]
}