title: AngularJS: Pause $digest & watchers on hidden DOM elements
body: <p>We're building a single page application which has multiple pages loaded as tabs. Only the content of one tab is visible at any given time (much like a browser), so we want to temporarily pause <code>$digest</code> and watchers from executing on those DOM nodes of the hidden tabs, until the user switches to that tab.</p>
  
  <p>Is there a way to achieve this, so that the model continues to be updated for the background tabs, but the view updates based on a condition.</p>
  
  <p>The following code illustrates the problem:</p>
  
  <pre><code>&lt;div ng-repeat="tab in tabs" ng-show="tab.id == current_tab.id"&gt;
      &lt;!-- tab content with bindings --&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The goal is optimization.</p>
  
  <p>I'm already aware of <a href="https://github.com/scalyr/angular" rel="noreferrer">Scalyr directives</a>, but I want a more specific solution without the extra features contained in Scalyr.</p>