"transition/interface" | @uirouter/core
  • Public
  • Public/Protected
  • All

Module "transition/interface"


Type aliases



HookMatchCriterion: string | IStateMatch | boolean

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, transition) { 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

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: (matchCriteria: HookMatchCriteria, callback: HookFn, options?: HookRegOptions) => Function

Type declaration


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

Generated using TypeDoc