thenikso / angular-inview

AngularJS directive to check if a DOM element is in the browser viewport.
http://thenikso.github.io/angular-inview/
MIT License
480 stars 112 forks source link

Set inView to false if ng-hide is present and set to true #126

Open AlessandroDG opened 7 years ago

AlessandroDG commented 7 years ago

This should fix https://github.com/thenikso/angular-inview/issues/113 Some may find this useful because sometimes ng-hide/ng-show cannot be replaced by ng-if. ng-if renders the element (and executes the controller) every time its value goes from false to true, and in certain cases that is inconvenient.

In my specific case I couldn't use ng-if because I needed the controller of the element to be executed even though the element itself would not be in the viewport yet.