jeffling / angular-jl-tether

Tether for Angular, so you can use it in directives declaratively
MIT License
22 stars 7 forks source link

Tether attachment doesn't reset when changing views in AngularJS #8

Open riteshjagga opened 8 years ago

riteshjagga commented 8 years ago

Please see the plnkr for the issue http://plnkr.co/edit/TUjX43?p=preview.

I have a tethered element which is attached to the header of View 1 which sticks to the top of the window when scrolled down. When changing view to View 2, the tethered attachment sticks around and doesn't disappear. It goes away when View 2 is scrolled.

I think that's because changing view is happening within the single page application's html file and actual scroll didn't happen.

Please let me know how to reset tether when changing views.

jeffling commented 8 years ago

I'm not sure i fully understand your bug. Your plnkr does not work for me, so I can't replicate it there.

To reset tether, you can get a reference to tether like so jl-tether="ngTetherReference". With that reference, you can do as you like on various events using what's in the native tether API!

Please let me know if you need any assistance, or if there is anything you would expect this directive to automatically do for you.

As always, PRs are super welcome!

riteshjagga commented 8 years ago

You can click the Live Preview eye icon on the right side if right side panel is not appearing and then click the green refresh button in the top-right whose tooltip says Manually trigger a refresh....

Please let me know if it still doesn't work.