-
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
Using scrollSpyAffix directive #51
Comments
I'm also struggling to use this, I hope the author will make some example pages soon. |
For getting the affix in your navbar.
and in the navbar.component.css
And finally in your navbar.component.html
Tweak the padding-bottom, changePos values to get it rite. |
@pratheekhegde Your snippet appears to be a way to hand-code the "affix" feature in an application, rather than using the existing scrollSpyAffix directive. There is more discussion in #72. |
@kylecordes This was a workaround back in November 2016. Even I wasn't able to get the affix working back then. Anyways thanks for pointing me to #72 now. |
@pratheekhegde Here is some good news. If you read through all of #72 and follow the pattern pointed out in there (scroll spy at some outer container DIV or whatever of your application, affix on the thing you want to affix) it does work today. |
I tried it and followed the steps, but it does nothing. No errors though... In particular my project uses .container... This is what I did: import {ScrollSpyAffixDirective} from "ng2-scrollspy/dist/plugin/affix.directive" then in @NgModule({ --- In my component.ts --- In my component.html
... -->Nothing at all happens... :( Can anybody comment on this? |
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 |
Hello,
I'm trying to make an affix in my app but can't figure out how to do this.
Have you got some example of scrollSpyAffix working fine?
I've tried the following but nothing appens
Thanks !
The text was updated successfully, but these errors were encountered: