How do I adapt existing decorator directive in AngularJS to select all checkboxes?
<p>I've been using a decorator directive to create a checkbox list that is based on this previous answer:
<a href="https://stackoverflow.com/questions/14514461/how-to-bind-to-list-of-checkbox-values-with-angularjs/14519881#14519881">How do I bind to list of checkbox values with AngularJS?</a></p>

<p>However, I want to add a "top-level" checkbox that toggles the selection of all checkboxes.</p>

<p>Is there a way to customise this directive to achieve this?</p>

<p>EDIT (I've included stripped down version of my code):</p>

<pre><code>(function ()
{
    var app = angular.module('editFormApp', ['centralCommunicationModule']);


    app.directive('editForm', ['sharedProjectService', function (sharedProjectService) {
            return {
                restrict: 'A',

                controller: ['$scope', '$http', '$filter', 'centralCommunicationService', function ($scope, $http, $filter, centralCommunicationService) {

                    $scope.checked_custGroupMembers = [];

                    $scope.reschedule = {};

                    // get reschedule object from server via service when id changes
                    $scope.$watch(function () { return sharedProjectService.rescheduleId }, function (newVal, oldVal) {
                    if (newVal != '') {
                        $scope.rescheduleId = newVal;                       

                        $http.get('/Reschedule/Get/', { params: { id: $scope.rescheduleId } }).success(function (data) {
                            var reschedule = angular.fromJson(data);

                            $scope.reschedule = reschedule;

                        });
                    }
                });

                }],

                templateUrl: '/Forms/_AddEditForm'  // MVC controller returning PartialView("~/Views/AngularTemplates/_AddEditForm.cshtml", model);
            };
    }]);
}



// declare directive in html
&lt;div edit-form&gt;&lt;/div&gt;

// template _AddEditForm.cshtml snippet below

&lt;div ng-repeat="circulationMember in reschedule.CustGroupCirculationMembers"&gt;
    &lt;label&gt;
        &lt;input name="custGroupMembers" type='checkbox' value="{{circulationMember.FullName}}" check-list='checked_custGroupMembers' id="{{circulationMember.Id}}" /&gt; {{circulationMember.FullName}}
    &lt;/label&gt;
&lt;/div&gt;
</code></pre>