patrickmarabeas / ng-ScrollSpy.js

An AngularJS module for navigation highlighting
http://patrickmarabeas.github.io/ng-ScrollSpy.js
MIT License
26 stars 9 forks source link

Integrate fix ng route #12

Open czolnowski opened 9 years ago

czolnowski commented 9 years ago

This PR adding possibility to integrate ng-ScrollSpy with ngRoute. The main problem is persisting the spies and checkActivity method in scope of broadcasting element. @patrickmarabeas please send me feedback what you think about this solution.

Cheers!

patrickmarabeas commented 9 years ago

Awesome, thanks - hopefully have some time to check it out soon : ) On 9 Feb 2015 4:41 am, "Marcin Czołnowski" notifications@github.com wrote:

This PR adding possibility to integrate ng-ScrollSpy with ngRoute. The main problem is persisting the spies and checkActivity method in scope of broadcasting element. @patrickmarabeas https://github.com/patrickmarabeas please send me feedback what you think about this solution.

Cheers!

You can view, comment on, or merge this pull request online at:

https://github.com/patrickmarabeas/ng-ScrollSpy.js/pull/12 Commit Summary

  • Fix problem with routing and remaining spies in current SpyFactory. Also solve problem with running checkActive for inactive broadcasters.
  • Body of route change events should execute when routes has changed.

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/patrickmarabeas/ng-ScrollSpy.js/pull/12.

patrickmarabeas commented 9 years ago

Any routing fixes should work with both vanilla Angular routing as well as Angular UI Router (etc). Would be good to be able to stipulate the necessary route change success in the scrollspyConfigProvider (/demo/scripts/demo.js) so the module doesn't have to get cluttered with fixes for every router.

Would be good to extend the demo to illustrate it working.

Thanks!