JonnyBGod / ngx-scrollspy

Angular ScrollSpy Service
MIT License
94 stars 21 forks source link

ScrollSpyElementDirective doesn't work #78

Closed NatsuOnFire closed 8 years ago

NatsuOnFire commented 8 years ago

Hi, I tried to add ng2-scrollspy to angular2 webpack starter 2.1.1 project but when I want to use ScrollSpyElementDirective I am getting no console.log.

NatsuOnFire commented 8 years ago

Sorry, It works fine. I thought that the scroll on an element would act when we get to that element in the page. I did not think it was on the scroll of that same element and it's not the same as Waypoints

JonnyBGod commented 8 years ago

That is a good use case. It should be possible to implement with a directive. Will probably add it when I get the time.

ValentinFunk commented 7 years ago

I've implemented a rudimentary Waypoints script using ng2-scrollspy, for anyone who need it: https://gist.github.com/Kamshak/63661e7ea251c92364a2ed1238f04264

JonnyBGod commented 7 years ago

@Kamshak Cool thank you for mentioning. Would you like to turn it into a plugin to be included in this repo?

ValentinFunk commented 7 years ago

The code works in a basic setup but i'm not sure if it will work for nested scroll panels. There are also some features that one could add (a Z offset for detection) and scroll directions.

At the moment i can't adapt it for more cases however feel free to add it as plugin maybe it will be useful for someone. Could act as a starting point