<!DOCTYPE html>
<html ng-app="Test">

<head>
  <script data-require="angular.js@*" data-semver="1.3.0-beta.5" src="https://code.angularjs.org/1.3.0-beta.5/angular.js"></script>
  <link rel="stylesheet" href="style.css" />
  <script src="script.js"></script>
</head>

<body ng-controller="TestController">

  <ul>
    <li ng-repeat="item in items">
      <strong>{{ item.name }}</strong>
      <span ng-repeat="tag in item.tags">{{ tag }}</span>
    </li>
  </ul>

  <fieldset>
    <span ng-repeat="tag in tags">
      <input type="checkbox" ng-model="tag.active">
      <label>{{ tag.label }}</label>
    </span>
  </fieldset>
  
  <p>Check tags data:</p>
  <code>{{ tags }}</code>  
  
</body>

</html>
// Code goes here

angular.module("Test", [])
  .controller("TestController", ['$scope', function ($scope) {
    $scope.items = [
      { name: "Test1", tags: ["tag1", "tag2"]},
      { name: "Test2", tags: ["tag3", "tag4"]},
      { name: "Test3", tags: ["tag3"]},
      { name: "Test4", tags: ["tag1", "tag4"]},
    ];
      
    $scope.tags = [
      { name: "tag1", label: "Tag1", active: true },
      { name: "tag2", label: "Tag2", active: false },
      { name: "tag3", label: "Tag3", active: true },
      { name: "tag4", label: "Tag4", active: false },
    ];
  }]);