We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
addResolvable
1 parent 7078216 commit 6d41c31Copy full SHA for 6d41c31
src/transition/transition.ts
@@ -368,6 +368,17 @@ export class Transition implements IHookRegistry {
368
/**
369
* Dynamically adds a new [[Resolvable]] (i.e., [[StateDeclaration.resolve]]) to this transition.
370
*
371
+ * #### Example:
372
+ * ```js
373
+ * transitionService.onBefore({}, transition => {
374
+ * transition.addResolvable({
375
+ * token: 'myResolve',
376
+ * deps: ['MyService'],
377
+ * resolveFn: myService => myService.getData()
378
+ * });
379
380
+ * ```
381
+ *
382
* @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]])
383
* @param state the state in the "to path" which should receive the new resolve (otherwise, the root state)
384
*/
0 commit comments