title: Angular js ng-init on display block of an element
body: <p>I need to call an angular controller function using ng-init once the element is visible...</p>
  
  <p>Ex: </p>
  
  <pre><code>//Do not call function as element is hidden.
  &lt;div style="display: none" ng-init="function()"&gt;&lt;/div&gt;
  
  //Call function as element is visible.
  &lt;div style="display: block" ng-init="function()"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>How to check with ng-init and call function accordingly?</p>