AngularJS : how to create DOM and bind to a model based on arbitrary hierarchical data
问题 Angularjs: complex directive in ng-repeat, how to bind the ngModel or ngChecked in directive and make it work? given the array: +----+-----------+----------+----------+-------+ | id | name | parentid | haschild | value | +----+-----------+----------+----------+-------+ | 1 | parent | null | false | true | | 2 | id1 child | 1 | true | true | | 3 | id2 child | 2 | true | true | | 4 | id3 child | 3 | false | true | | 5 | id1 child | 1 | true | true | | 6 | id5 child | 5 | false | true | +----+--