title: Angular: How to force recompile directive?
body: <p>HTML:</p>
  
  <pre><code>&lt;div ng-repeat="obj in arr"&gt;
     &lt;custom-directive status-stored-in="obj"&gt;&lt;/custom-directive&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Problem:</p>
  
  <p>I have page-turn built in for the large amount of <code>obj</code>s. Which means that the value of <code>arr</code>, representing the current page of <code>obj</code>s, will change. However, the <code>obj</code> in the <code>status-stored-in="obj"</code> part is not refreshed with the change.</p>
  
  <p>Right now my solution is to add a <code>ng-if</code> in <code>customDirective</code>, flickering its value back and forth to have it force recompiled. Is there any other equivalent, neater way to deal with this?</p>
  
  <h2>Edit:</h2>
  
  <p>The start of the custom directive:</p>
  
  <pre><code>module.directive 'checkbox', (checkboxHooks) -&gt;
    restrict: 'E'
    scope:
      hook: '='
      hookedTo: '='
      statusStoredIn: '='
    templateUrl: 'templates/checkbox.html'
    link: (scope, element, attr) -&gt;
  </code></pre>
  
  <p>The gist is that it needs to get hold of an object, for storing the <code>checked</code> status. The whole of it can be found here: [<a href="https://github.com/Luxiyalu/angular-checkbox-set/blob/master/angular-checkbox-set.coffee" rel="noreferrer">coffee</a>/<a href="https://github.com/Luxiyalu/angular-checkbox-set/blob/master/angular-checkbox-set.js" rel="noreferrer">js</a>].</p>