title: How to make an angularjs directive aware of whether or not it is visible on the page
body: <p>I have some custom directives, which control custom validations.</p>
  
  <p>These directives may be hidden by an ngShow or ngHide directive, on its own element or an ancestor element.</p>
  
  <p><strong>How can I make my directive aware of whether or not it is hidden</strong>? (so that when another controller asks about its contents it won't report validation errors)</p>
  
  <p>I guess it's possible to have a method on the directive's controller that checks whether the directive's element, or any of its ancestor elements have an ng-show/hide attribute set with an expression that evaluates within its own scope so as to hide it... But this would require an undesirable quantity of logic and dom access (slow), and so I'm hoping there's a better way.</p>