Checkbox binding
HTML
<div ng-app="app">
<div ng-controller="testCtrl as test">
{{test.items | json}}
<table>
<tr ng-repeat="item in test.items">
<td>
<input type="checkbox" ng-true-value="'{{item.name}}'" ng-model="test.selectedValues[$index]"/>
</td>
</tr>
</table>
<button ng-click="test.click()" value="Click">
opkdpoke
</button>
</div>
</div>
JavaScript
angular.module('app', [])
.controller('testCtrl', ['$scope', function($scope) {
var self = this;
this.selectedValues = [];
this.items = [
{name:'Startup'},
{name:'Environment setup'},
{name:'Requirement gathering'},
{name:'Design'},
{name:'Development & Unit Testing'},
{name:'System integration testing'},
{name:'Development & Unit Testing'},
{name:'Deployment / Rollout'},
{name:'Documentation – User Guide & Present'}
];
this.click = function()
{
console.log(this.selectedValues);
}
}]);