title: how to select all checkbox with Master checkbox in angularjs
body: <p>I have 1 Top Master select box, which (de)activates Master 1 and Master 2 checkboxes. And Master 1 and 2 can (de)activates each 4 Slave checkboxes. I use here ng-model and ng-checked.</p>
  
  <p>e.g.</p>
  
  <pre><code>&lt;input type="checkbox" ng-checked="top" ng-model="master1"/&gt; Master 1  
  </code></pre>
  
  <p>My question: </p>
  
  <ol>
  <li>When TOP Master is selected, why are the slaves of Master 1 and
  Master 2 not selected, although their ng-model (Master 1 and Master
  2) are selected? When I select Master 1 or Master 2, their slaves
  will be selected.</li>
  <li>If 4 slaves are selected, the Master of them should be also selected. When both Masters are selected, then TOP Master should be selected. How can I realize it? With which controller?</li>
  </ol>
  
  <p>Please check my code on Fiddle <a href="http://jsfiddle.net/aF2aL/32/" rel="nofollow">http://jsfiddle.net/aF2aL/32/</a></p>