How angular binds checkbox?

list is the current checkbox array, and ary is the selected checkbox array
clipboard.png

clipboard.png

clipboard.png

bug

clipboard.png

the apple is selected when initialization comes in, but I haven"t dealt with the fact that my ary is empty.
when I click on the pear, the status of the pear in the list becomes true.
then I take this list to Filter and assign the status as true to the ary,
but the printed ary value is wrong. Apples and pears with status for true in list.
Why is ary just an apple?

Mar.07,2021

initial check, isn't it the checked attribute?


has been solved. Just replace the click event with the change event

Menu