-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use scrollspy? #74
Comments
ScrollSpy core parts are intended for developers to create their own functionality os learn how to properly spy on scroll. Are your trying to setup a specific plugin? |
I am trying to wrap my head around this plugin too, but it is not self explanatory. Since I couldn't get the scrollspy-affix directive working I implemented the navigation-scrollspy by my own which is working now. Still it feels strange to implement something that already exists in that very plugin. But this is already talked about in the other thread #72 I would like to get some advice on certain aspects of the sticky behavior:
Partially I can already answer this question, since I took a break over the weekend I had a fresh view on that.
The top value is the distance which the element will keep once scrollSpy set the .affix class. |
With the help of @JonnyBGod I've created an example implementation https://ngx-scrollspy.now.sh The source can be found here https://github.com/beeman/ngx-scrollspy-angular-cli-demo |
@beeman Thank you, your code was very helpfull. I am struggling with "scrollSpy-index-render" because i want to use my own custom ul list. This is how you managed to rendered your Navbar:
My custom Navbar in Bootstrap4:
Either there is a good way to change design of "scrollSpy-index-render" or use your my own custom Navbar? Documentation of |
Does ngx-scrollspy require Bootstrap 4? I've tried to implement 2 approaches - 1 in the read.md for ngx-scrollspy, but somthing seems missing in the instructions regarding the ScrollSPyService. The observable always returns undefined. Specifically, the code in 'ngAfterViewInit' (copied from Read.md) throws the exception since the service returns undefined. |
Can you provide demo of scrollspy? I don't know which directive should I use for scrollspy?
The text was updated successfully, but these errors were encountered: