简体   繁体   中英

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 . When I click on the ion-checkbox it doesn't work correctly.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM