【发布时间】:2020-09-19 04:33:19
【问题描述】:
每当我更改布尔变量的值时,我都会有以下堆栈闪电战,我希望重新渲染组件,我该如何实现?
https://stackblitz.com/edit/angular-ivy-8rwqba?file=src/app/app.component.html
【问题讨论】:
标签: angular components
每当我更改布尔变量的值时,我都会有以下堆栈闪电战,我希望重新渲染组件,我该如何实现?
https://stackblitz.com/edit/angular-ivy-8rwqba?file=src/app/app.component.html
【问题讨论】:
标签: angular components
使用[checked] 代替[value]:
<input type="checkbox" [checked]="test1"/>test1 - {{test1}}
<input type="checkbox" [checked]="test2"/>test2 - {{test2}}
【讨论】: