Can't use checked/unchecked checkbox logic on camunda table rows

I want to add check all checkbox to my table which will be able to collect checked data into one array ( i am making this into camunda embedded forms environment) here is my code which should help me make this:

$scope.checkAll = function () {
        if ($scope.selectedAll) {
            $scope.selectedAll = true;
        } else {
            $scope.selectedAll = false;
        }
        angular.forEach($scope.selectedDocuments, function (item) {
            item.selectedDocuments = $scope.selectedAll;
        });

    };

p.s selectedDocuments is my array

here is my html code:

<table name ="table" id="myTable" class="table table-hover  table-list-search" data-table="order-table" style="width:100%;" cellspacing="0">
            <thead>
                <tr>
                    <th style="width:80px; height:25px;"><input style="width:25px; height:25px;" type="checkbox" ng-model="selectedAll" ng-click="checkAll()"></th>
                    <th style="width:140px;">id</th>
                    <th style="width:305px;">organizationName</th>
                    <th style="width:305px;">priority</th>
                     <th>&nbsp;</th>
                </tr>           
            </thead>
            <tbody ng-repeat="item in jsonData" >
                <tr>
                    <td><input type="checkbox" ng-change="sync(item.Selected, item)"  ng-checked="isChecked(item.id) ng-model="item.Selected""  /></td> 
                    <td>{{item.id}}</td>
                    <td>{{item.organizationName}}</td>

                     <td>{{item.priority}}</td>                   
                     <td><button class="btn btn-default btn-xs" ng-click="toggle($index)"><span class="glyphicon glyphicon-eye-open"></span></button></td>


    </tr>   
    </table>

but when i deploy this code i usually got this error: unexpected tokens or if it deployes without error i can’t select all td-es on main checkbox click( i mean if it deployees without errors i can’t use it properly) what should i change to make this code work?