ng-ScrollSpy.js icon indicating copy to clipboard operation
ng-ScrollSpy.js copied to clipboard

Integrate fix ng route

Open czolnowski opened this issue 10 years ago • 2 comments

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!

czolnowski avatar Feb 08 '15 17:02 czolnowski

Awesome, thanks - hopefully have some time to check it out soon : ) On 9 Feb 2015 4:41 am, "Marcin Czołnowski" [email protected] 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

  • M src/ng-ScrollSpy.js https://github.com/patrickmarabeas/ng-ScrollSpy.js/pull/12/files#diff-0 (27)

Patch Links:

  • https://github.com/patrickmarabeas/ng-ScrollSpy.js/pull/12.patch
  • https://github.com/patrickmarabeas/ng-ScrollSpy.js/pull/12.diff

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

patrickmarabeas avatar Feb 08 '15 21:02 patrickmarabeas

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!

patrickmarabeas avatar Feb 15 '15 03:02 patrickmarabeas