Closed aboalwi closed 7 years ago
I've not gotten into angular w/ nativescript to know enough here. I'll see if @NathanWalker or @triniwiz have a clue from the sample you provided.
@bradmartin i never used ngModel
the app simply uses [checked]="someVal"
Same problem here.
@triniwiz That's one way binding and binding property never changes when clicking the checkbox.
Have to use some other UI element due to this issue.
@devna13 i handle changes with (checkedChange)="doSomething($event)"
@triniwiz are you sure!? There is no event called checkedChange.
<CheckBox [checked]="item.completed" text="" (checkedChange)="itemChecked($event)"></CheckBox>
itemChecked(event){
let checked = event.value;
this.item.completed = value;
}
it's simple as above and this works because i am currently using this atm
<CheckBox [checked]="item.completed" text="" (checkedChange)="itemChecked($event)"></CheckBox> itemChecked(event){ let checked = event.value; this.item.completed = value; }
it's simple as above and this works because i am currently using this atm
Thanks
I need to update the checked value in array If i use [checked] instead it wont be updated will always be false unless i have some way to update the array element based on the nativeElement value :/