How do I bind to list of checkbox values with AngularJS?

前端 未结 29 2651
天涯浪人
天涯浪人 2020-11-22 05:20

I have a few checkboxes:





        
29条回答
  •  时光取名叫无心
    2020-11-22 06:00

    Based on answers in this thread I've created checklist-model directive that covers all cases:

    • simple array of primitives
    • array of objects (pick id or whole object)
    • object properties iteration

    For topic-starter case it would be:

    
    

提交回复
热议问题