<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js"></script>
<script>
var app = angular.module('app', []);
app.controller('checkController', function($scope){
// Supomos que este array é a resposta do JSON da webservice
$scope.categorias = {
Esportes:1,
Entreterimento:0
};
});
</script>
</head>
<body ng-app="app">
<h1>checkbox true!</h1>
<div ng-controller="checkController">
<table>
<thead>
<tr>
<td>Categorias</td>
<td>Selecione</td>
</tr>
</thead>
<tbody>
<!-- loop para lista de categorias -->
<tr ng-repeat="(key, value) in categorias">
<td>{{key}}</td>
<td>
<input type="checkbox" ng-model="categorias[key]"
name="{{key}}" ng-checked="value"/>
</td>
</tr>
</tbody>
</table>
{{categorias}}
</div>
</body>
</html>
// Code goes here
/* Styles go here */