I'm having problems in this situation:
@Component({
selector: 'my-app',
template: `
{{items | async| json}}
<div *ngFor="let item of items | async">
<input type=checkbox [(ngModel)]="item.b"/>
</div>
`
})
export class AppComponent {
items = of([{
name: '1',
},
{
name: '2',
},
{
name: '3',
}])
.pipe(map(i=>{
return i.map(i=>{
return {
i: i,
b: false
}
})
}))
}
The problem is that the ngModel is not working and I can't see the b property change. If I remove the map pipe and I put the boolean property in the first array, all is working. Am I missing something? What's the problem?
Thanks