// Fetched when the resolve's state is being entered.// Wait for the promise to resolve.var policy1 = { when: "LAZY", async: "WAIT" }
// Fetched when the Transition is starting.// Do not wait for the returned promise to resolve.// Inject the raw promise/valuevar policy2 = { when: "EAGER", async: "NOWAIT" }
The policy for a given Resolvable is merged from three sources (highest priority first):
1) Individual resolve definition
2) State definition
3) Global default
Example:
// Wait for an Observable to emit one item.// Since `wait` is not specified, it uses the `wait`// policy defined on the state, or the global default// if no `wait` policy is defined on the statevar myResolvablePolicy = { async: "RXWAIT" }
Defines how a resolve is processed during a transition
This object is the StateDeclaration.resolvePolicy property.
Example:
// Fetched when the resolve's state is being entered. // Wait for the promise to resolve. var policy1 = { when: "LAZY", async: "WAIT" } // Fetched when the Transition is starting. // Do not wait for the returned promise to resolve. // Inject the raw promise/value var policy2 = { when: "EAGER", async: "NOWAIT" }
The policy for a given Resolvable is merged from three sources (highest priority first):
Example:
// Wait for an Observable to emit one item. // Since `wait` is not specified, it uses the `wait` // policy defined on the state, or the global default // if no `wait` policy is defined on the state var myResolvablePolicy = { async: "RXWAIT" }