artch/angular-route-segment — pull request #5 by hupf (2013-08-21 13:51:06+00:00)
Title: add 'routeSegmentChangesSuccess' event (when all segments are updated)

Hi Artem

Thank you for the great work. The segment router looks really promising and fits well for our scenario. We are building a mobile web app where ­– instead of side-by-side segments – we use the segments as layers.

E.g. if the user scolls down a long list (list-segment), then opens an entry (entry-segment), we store the scroll position and hide the list-segment such that only the entry-segment is visible. When he gets back to the list, we restore the scroll position such that the user is at the exact same spot as before.

For this I have to know the name of the current segment in the 'segmentChange' event. That's why I've added a 'routeSegmentChangesSuccess' event, that gets fired when all the segments have been updated. I think this might be useful for other scenarios as well and is the complement to the '$routeChangeSuccess' event of ngRoute.

If you're willing to support the "layer" scenario with the segment router, we might also try to integrate some of our (yet ongoing) work we're doing to get this running.

Mathis