transition | UI-Router
Options
All
  • Public
  • Public/Protected
  • All
Menu

External module transition

This module contains APIs related to a Transition.

See Transition, $transitions

Index

Type aliases

HookMatchCriterion: string | function | boolean

Hook Criterion used to match a transition.

Hook Criterion used to match a transition.

A Glob string that matches the name of a state.

Or, a function with the signature function(state) { return matches; } which should return a boolean to indicate if a state matches.

Or, true to always match

HookResult: boolean | TargetState | void | Promise<boolean | TargetState | void>

The return value of a TransitionHookFn or TransitionStateHookFn

The return value of a TransitionHookFn or TransitionStateHookFn

When returned from a TransitionHookFn or TransitionStateHookFn, these values alter the running Transition:

  • false: the transition will be cancelled.
  • TargetState: the transition will be redirected to the new target state (see: StateService.target)
  • Promise: the transition will wait for the promise to resolve or reject
    • If the promise is rejected (or resolves to false), the transition will be cancelled
    • If the promise resolves to a TargetState, the transition will be redirected
    • If the promise resolves to anything else, the transition will resume
  • Anything else: the transition will resume
IErrorHandler: function

Type declaration

    • (error: Error): void
    • Parameters

      • error: Error

      Returns void

IHookGetter: function

Type declaration

    • (hookName: string): IEventHook[]
    • Parameters

      • hookName: string

      Returns IEventHook[]

IHookRegistration: function

Type declaration

IStateMatch: Predicate

A predicate type which takes a State and returns a boolean

A predicate type which takes a State and returns a boolean

Variables

stateSelf: function

Type declaration

transitionCount: number

Functions

  • tupleSort(reverseDepthSort?: boolean): nodeDepthThenPriority
  • A factory for a sort function for HookTuples.

  • A factory for a sort function for HookTuples.

    The sort function first compares the PathNode depth (how deep in the state tree a node is), then compares the EventHook priority.

    Parameters

    • reverseDepthSort Default value: boolean = false
      :

      a boolean, when true, reverses the sort order for the node depth

    Returns nodeDepthThenPriority

    :

    a tuple sort function


Object literals

defaultOptions: object
async: boolean
bind: null
current: noop
rejectIfSuperseded: boolean
traceData: object

Type declaration

transition: null
defaultTransOpts: object

The default Transition options.

The default Transition options.

Include this object when applying custom defaults: let reloadOpts = { reload: true, notify: true } let options = defaults(theirOpts, customDefaults, defaultOptions);

custom: object

Type declaration

inherit: boolean
location: boolean
notify: boolean
relative: null
reload: boolean
source: "unknown"
  • current(): any

Generated using TypeDoc