artch/angular-route-segment — pull request #59 by laurindofljunior (2014-08-12 16:50:56+00:00)
Title: Changes the order in which the broadcast is called. Thus the return to t...

Changes the order in which the broadcast is called. Thus the return to the Controller happens after completion and changes the url (segment).
Without this change, segments with subsegments can present problems since returning to the Controller before correcting the segment altogether.
example:
I have 2 segments that I want to access: "section1.edit" and "section2".
I called the segment "section1.edit" and now i desire access the segment "section2". At this moment, the function returns to the Controller before changes of the chain elements, ie, returns to Controller while it is still segment "section2.edit" and not only "section2".
The broadcast makes return ahead of time, because the url changes happen after the execution of broadcast.