thisissoon / angular-scrollspy

A simple lightweight library for Angular which automatically updates links to indicate the currently active section in the viewport
MIT License
35 stars 15 forks source link

Target specific element instead on window #12

Open RitzBrio opened 5 years ago

RitzBrio commented 5 years ago

Hi!

Is there a way to target a container div instead of the window?

Thanks!

edoparearyee commented 5 years ago

Hi @RitzBrio at the moment it doesn't, however the angular-inviewport directive that this library uses to detect the inviewport status does.

So it maybe possible with an update to simply pass a reference to a parent element to the inviewport directive.