angular-route-segment icon indicating copy to clipboard operation
angular-route-segment copied to clipboard

Feature: resolves depending on resolves

Open troygilbert opened this issue 11 years ago • 1 comments

In several situations I've needed to resolve several resources, e.g. A and B, where B depends on A. Since the resolve functions are called in parallel (assuming resolving is async using promises), I'm not able to resolve two resources, rather I have to resolve a single resource, e.g., AandB, and manage the dependency chain with promises inside the resolve function.

This is not that big of a deal to manage, but it does ugly the code a bit and seems like a bit of promise magic could be applied to make the resolve param a bit more powerful.

troygilbert avatar Nov 06 '14 22:11 troygilbert

Just FYI, ui-router supports exactly this functionality and, after porting my routing code over to it, massively cleaned up my code. It's a definite win.

troygilbert avatar Nov 16 '14 18:11 troygilbert