[英]Ionic ion-checkbox [(ngModel)]=“! item.open” it does not work
I need to check the items "Not open" in an ion-checkbox
, but the item I get from a server is item.open
.我需要检查
ion-checkbox
中的“未打开”项目,但我从服务器获得的项目是item.open
。 When I click on the ion-checkbox
it doesn't work correctly.当我单击
ion-checkbox
时,它无法正常工作。
Does anyone have a solution?有没有人有办法解决吗?
ion-checkbox [(ngModel)]="!item.open"
You can use ionChange
method so you will be able to keep track of the value.您可以使用
ionChange
方法,这样您就可以跟踪该值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.