Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise),
and the unwrapped-when-complete (.data) result of the resolveFn.
Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the
resolveFn) and returns the resulting promise.
Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first
parameter to those fns.
Fetches the data and returns a promise.
Returns the existing promise if it has already been fetched once.
Parameters
resolveContext: any
trans: any
Returns any
getPolicy
getPolicy(state): { async: any; when: any; }
Parameters
state: any
Returns { async: any; when: any; }
async: any
when: any
resolve
resolve(resolveContext, trans): any
Asynchronously resolve this Resolvable's data
Given a ResolveContext that this Resolvable is found in:
Wait for this Resolvable's dependencies, then invoke this Resolvable's function
and update the Resolvable's state
The basic building block for the resolve system.
Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise), and the unwrapped-when-complete (.data) result of the resolveFn.
Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the resolveFn) and returns the resulting promise.
Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first parameter to those fns.