transition | @uirouter/core
Options
Menu

Module transition

Transition subsystem

This module contains APIs related to a Transition.

See:

Index

Type aliases

ErrorHandler: function

Type declaration

    • (error: any): Promise<any>
    • Parameters

      • error any

      Returns Promise<any>

GetErrorHandler: function

Type declaration

GetResultHandler: function

Type declaration

HookMatchCriterion: string | true | false | function

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: true | false | void | TargetState | Promise<true | false | void | TargetState>

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
IHookRegistration: function

Type declaration

IStateMatch: Predicate<StateObject>

A predicate type which tests if a StateObject passes some test. Returns a boolean.

A predicate type which tests if a StateObject passes some test. Returns a boolean.

ResultHandler: function

Type declaration

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
bind: null = null
current: noop = noop
traceData: object

Type declaration

transition: null = 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 = false
location: boolean = true
notify: boolean = true
relative: null = null
reload: boolean = false
source: string = "unknown"
  • current(): any

Generated using TypeDoc