title: Apply in progress in Angular.JS
body: <p>I have <code>angularjs</code> application and <code>&lt;span&gt;</code> in it. I try to hide it with <code>ng-hide</code> directive, but:</p>
  
  <pre><code>&lt;span ng-hide="hideSpan"&gt;
  </code></pre>
  
  <p>And</p>
  
  <pre><code>// controller code here
  ....
  $scope.hideSpan = true;
  ....
  </code></pre>
  
  <p>Doesn't work, it's ignoring. And if i make:</p>
  
  <pre><code>// controller code here
  ....
  $scope.$apply(function(){$scope.hideSpan = true});
  ....
  </code></pre>
  
  <p>I get error: <code>$apply</code> already in progress.</p>
  
  <p>How can i correctly use <code>ng-hide/ng-show</code> in this way?</p>
  
  <p>Thank you.</p>