i have resource in my controller and populate checkboxes with ng-repeat
next thing i know in controller which are to be checked
code will looks like..
$scope.data = resource.query();
var arr_to_be_checked = [1,3,5];
in other controller i use this..
$scope.data = [ { Type: 1, checked: true, Title: 'Item A'},
{ Type: 2, checked: false, Title: 'Item B'}];
and its working fine but i need apply this on resource and ng-repeat because i need more flexible
i find any soulution but without point. Pls can you help me anyone?
My question is: How i can “override” objects in resource with ‘checked:true’ or set any checkbox as checked.
Thank you so much for help or any idea
Have a nice day
.
PS: Please be really consistent on your naming conventions, javascript uses a
camelCasenaming convention, no underscores. Only constructor functions are namedPascalCaseRelated API Documentation:
ng-click
ng-checked