### input checkbox中使用ngModel
```javascript
<span *ngFor="let hobbyitem of userinfos.hobby;let key=index;">
<input type="checkbox" [id]="'check'+key" value="" [(ngModel)]="hobbyitem.checked">
<label [for]="'check'+key">{{hobbyitem.hobbytitle}}</label>
</span>
<pre>
<!--管道处理格式化userinfos对象-->
{{userinfos|json}}
</pre>
```
有疑问加站长微信联系(非本文作者))