Feature: resolves depending on resolves
Opened this issue · 1 comments
troygilbert commented
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 commented
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.