artch/angular-route-segment

disallow route change until the 'resolve' will not be resolved

Opened this issue · 1 comments

I have situation when you come to 'route1' ($resource1 with a lot of data) and then make a fast switch to 'route2' ($resource2 with less of data) - 'resolve2' resolves faster and we got it data, but then 'resolve1' is going to be resolved and it overwrites 'resolve2' and we got wrong data in right route.

Is there possibility to disallow route change until the 'resolve' will not be resolved? Or maybe you can propose some solution?

P.S. Sorry for my bad english.

I have this exact issue - if the user follows a link to route A, B then C, whichever one loads slowest will be displayed. I feel like the user should end up on whatever route they navigated to last.

Edit: created a pull request with my attempt to fix this.