You could always manage the checked state outside of the model if you 
wanted.  Just add an ng-click="checkToggle(a.id)" to your template then in 
your controller have the checkToggle method that will update an array of 
check values.

$scope.checkToggle = function(id) {
if (!$scope.checkedValues[id] || $scope.checkedValues[id] === false) {
 $scope.checkedValues[id] = true;
} else {
 $scope.checkedValues[id] = false;
}
}


Using this method you could also drive the checked state of you checkboxes 
using the checkedValues scope var is you primed it when you data was 
loaded.  If this is totally off could you post a portion of you code and 
json data so there is something more to go on?


Gordon
On Tuesday, April 1, 2014 8:39:57 AM UTC-5, cutey Love wrote:
>
> Thanks, problem is newblog.checked as a model is bound and I have multiple 
> checkboxes(need multi select), is there anyway of having newblog.checked as 
> an array and pushing values on check to it?
>  
>
> On Tuesday, April 1, 2014 2:24:14 PM UTC+1, Sander Elias wrote:
>
>> Hi Cutey,
>>
>> I opened up the 
>> manual<http://docs.angularjs.org/api/ng/input/input%5Bcheckbox%5D>, 
>> and would suggest the use of ng-true-value and/or ng-false-value.
>>
>> Regards
>> Sander
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to