I like to enable the cancel button if minimum one job is checked.

### This is my HTML View

```
<table>
   <tr ng-repeat="x in jobs" ng-class-odd="'odd'" ng-class-even="'even'">
     <td style="width: 247px;">
        <input type="checkbox" ng-model="checked">
     </td>
     <td style="width: 247px;">{{ x.Name }}</td>
     <td style="width: 247px;">{{ x.Id }}</td>
   </tr>
</table>

<button ng-click="myFunc()" ng-disabled="countChecked()!=1">Cancel</button>

```

### This is my script

```
$scope.countChecked = function(){
   var count = 0;
   angular.forEach($scope.jobs, function(){
     if (checked) count++;
   });

   return count;
 }

```

Iam new to AngularJS.