Angular directive which checks if an element is within a certain range of viewport