RegisteredHook | @uirouter/angularjs
Options
Menu

The registration data for a registered transition hook

Hierarchy

  • RegisteredHook

Index

Constructors

Properties

_deregistered: boolean = false
bind: any
callback: HookFn
invokeCount: number = 0
invokeLimit: number
matchCriteria: HookMatchCriteria
priority: number
removeHookFromRegistry: function

Type declaration

Methods

  • _getDefaultMatchCriteria(): HookMatchCriteria
  • Gets the default match criteria (all true)

  • Gets the default match criteria (all true)

    Returns an object which has all the criteria match paths as keys and true as values, i.e.:

    ```js { to: true, from: true, entering: true, exiting: true, retained: true, }


  • Gets matching nodes as IMatchingNodes

    Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to:

    let matches: IMatchingNodes = {
      to:       _matchingNodes([tail(treeChanges.to)],   mc.to),
      from:     _matchingNodes([tail(treeChanges.from)], mc.from),
      exiting:  _matchingNodes(treeChanges.exiting,      mc.exiting),
      retained: _matchingNodes(treeChanges.retained,     mc.retained),
      entering: _matchingNodes(treeChanges.entering,     mc.entering),
    };
    

    Parameters

    Returns IMatchingNodes


  • Gets the matching PathNodes

    Given an array of PathNodes, and a HookMatchCriterion, returns an array containing the PathNodes that the criteria matches, or null if there were no matching nodes.

    Returning null is significant to distinguish between the default "match-all criterion value" of true compared to a () => true function, when the nodes is an empty array.

    This is useful to allow a transition match criteria of entering: true to still match a transition, even when entering === []. Contrast that with entering: (state) => true which only matches when a state is actually being entered.

    Parameters

    Returns PathNode[]


  • deregister(): void

Generated using TypeDoc