Angular checkboxes example
HTML
<script src="http://docs-next.angularjs.org/angular-0.10.5.min.js" ng:autobind></script>
<script>
function MyCntrl(){
var scope = this;
scope.lastcheck = '';
scope.mylastcolor = {};
scope.colors = [
{name:'black', shade:'dark'},
{name:'white', shade:'light'},
{name:'red', shade:'dark'},
{name:'blue', shade:'dark'},
{name:'yellow', shade:'light'}
];
scope.logit = function(item) {
scope.lastcheck = item;
scope.mylastcolor = { border: 'solid 1px ' + item.name };
};
}
</script>
<div ng:controller="MyCntrl">
<form id="myForm">
<ul>
<li ng:repeat="color in colors">
{{color.name}} <input type="checkbox" ng:model="color" ng:click="logit(color)">
</li>
</ul>
<p ng:style="mylastcolor">Last Checked <span >{{lastcheck}}</span>
</p>
</form>
</div>