## Index

### Variables

- RESOLVE_HOOK_PRIORITY
- TRANSITION_TOKENS
- isTransition
- onEnterHook
- onExitHook
- onRetainHook

### Functions

- activateViews
- addCoreResolvables
- eagerResolvePath
- ignoredHook
- invalidTransitionHook
- lazyLoadHook
- lazyLoadState
- lazyResolveState
- loadEnteringViews
- redirectToHook
- registerActivateViews
- registerAddCoreResolvables
- registerEagerResolvePath
- registerIgnoredTransitionHook
- registerInvalidTransitionHook
- registerLazyLoadHook
- registerLazyResolveState
- registerLoadEnteringViews
- registerOnEnterHook
- registerOnExitHook
- registerOnRetainHook
- registerRedirectToHook
- registerResolveRemaining
- registerUpdateGlobalState
- registerUpdateUrl
- resolveRemaining
- treeChangesCleanup
- updateGlobalState
- updateUrl

## Variables

RESOLVE_HOOK_PRIORITY: 1000 = 1000

- Defined in hooks/resolve.ts:11

TRANSITION_TOKENS: (string | Transition)[] = ['$transition$', Transition]

- Defined in hooks/coreResolvables.ts:24

isTransition: function = inArray(TRANSITION_TOKENS)

#### Type declaration

- - (obj: any): boolean

  - #### Parameters

    - ##### obj any

    #### Returns boolean

- Defined in hooks/coreResolvables.ts:25

onEnterHook: TransitionStateHookFn = makeEnterExitRetainHook('onEnter')

The TransitionStateHookFn for onEnter

The TransitionStateHookFn for onEnter

When the state is being entered, the state's .onEnter function is invoked.

Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);`

See: IHookRegistry.onEnter

- Defined in hooks/onEnterExitRetain.ts:60

onExitHook: TransitionStateHookFn = makeEnterExitRetainHook('onExit')

The TransitionStateHookFn for onExit

The TransitionStateHookFn for onExit

When the state is being exited, the state's .onExit function is invoked.

Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);`

See: IHookRegistry.onExit

- Defined in hooks/onEnterExitRetain.ts:34

onRetainHook: TransitionStateHookFn = makeEnterExitRetainHook('onRetain')

The TransitionStateHookFn for onRetain

The TransitionStateHookFn for onRetain

When the state was already entered, and is not being exited or re-entered, the state's .onRetain function is invoked.

Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);`

See: IHookRegistry.onRetain

- Defined in hooks/onEnterExitRetain.ts:47

## Functions

- activateViews(transition: Transition): void

- A TransitionHookFn which activates the new views when a transition is successful.

- A TransitionHookFn which activates the new views when a transition is successful.

  Registered using `transitionService.onSuccess({}, activateViews);`

  After a transition is complete, this hook deactivates the old views from the previous state, and activates the new views from the destination state.

  See ViewService

  #### Parameters

  - ##### transition Transition

  #### Returns void

  - Defined in hooks/views.ts:39

- addCoreResolvables(trans: Transition): void

- #### Parameters

  - ##### trans Transition

  #### Returns void

  - Defined in hooks/coreResolvables.ts:10

- eagerResolvePath(trans: Transition): Promise<any>

- A TransitionHookFn which resolves all EAGER Resolvables in the To Path

- A TransitionHookFn which resolves all EAGER Resolvables in the To Path

  Registered using `transitionService.onStart({}, eagerResolvePath, { priority: 1000 });`

  When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for.

  See StateDeclaration.resolve

  #### Parameters

  - ##### trans Transition

  #### Returns Promise<any>

  - Defined in hooks/resolve.ts:22

- ignoredHook(trans: Transition): Promise<any>

- A TransitionHookFn that skips a transition if it should be ignored

- A TransitionHookFn that skips a transition if it should be ignored

  This hook is invoked at the end of the onBefore phase.

  If the transition should be ignored (because no parameter or states changed) then the transition is ignored and not processed.

  #### Parameters

  - ##### trans Transition

  #### Returns Promise<any>

  - Defined in hooks/ignoredTransition.ts:16

- invalidTransitionHook(trans: Transition): void

- A TransitionHookFn that rejects the Transition if it is invalid

- A TransitionHookFn that rejects the Transition if it is invalid

  This hook is invoked at the end of the onBefore phase. If the transition is invalid (for example, param values do not validate) then the transition is rejected.

  #### Parameters

  - ##### trans Transition

  #### Returns void

  - Defined in hooks/invalidTransition.ts:13

- lazyLoadHook(transition: Transition): Promise<TargetState>

- A TransitionHookFn that performs lazy loading

- A TransitionHookFn that performs lazy loading

  When entering a state "abc" which has a `lazyLoad` function defined:

  - Invoke the `lazyLoad` function (unless it is already in process)
    - Flag the hook function as "in process"
    - The function should return a promise (that resolves when lazy loading is complete)
  - Wait for the promise to settle
    - If the promise resolves to a LazyLoadResult, then register those states
    - Flag the hook function as "not in process"
  - If the hook was successful
    - Remove the `lazyLoad` function from the state declaration
  - If all the hooks were successful
    - Retry the transition (by returning a TargetState)

      .state('abc', {
        component: 'fooComponent',
        lazyLoad: () => System.import('./fooComponent')
        });

  See StateDeclaration.lazyLoad

  #### Parameters

  - ##### transition Transition

  #### Returns Promise<TargetState>

  - Defined in hooks/lazyLoad.ts:33

- lazyLoadState(transition: Transition, state: StateDeclaration): Promise<LazyLoadResult>

- Invokes a state's lazy load function

- Invokes a state's lazy load function

  #### Parameters

  - ##### transition Transition

    :

    a Transition context

  - ##### state StateDeclaration

    :

    the state to lazy load

  #### Returns Promise<LazyLoadResult>

  :

  A promise for the lazy load result

  - Defined in hooks/lazyLoad.ts:80

- lazyResolveState(trans: Transition, state: StateDeclaration): Promise<any>

- A TransitionHookFn which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path

- A TransitionHookFn which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path

  Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState, { priority: 1000 });`

  When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for.

  See StateDeclaration.resolve

  #### Parameters

  - ##### trans Transition

  - ##### state StateDeclaration

  #### Returns Promise<any>

  - Defined in hooks/resolve.ts:39

- loadEnteringViews(transition: Transition): Promise<any>

- A TransitionHookFn which waits for the views to load

- A TransitionHookFn which waits for the views to load

  Registered using `transitionService.onStart({}, loadEnteringViews);`

  Allows the views to do async work in ViewConfig.load before the transition continues. In angular 1, this includes loading the templates.

  #### Parameters

  - ##### transition Transition

  #### Returns Promise<any>

  - Defined in hooks/views.ts:19

- redirectToHook(trans: Transition): TargetState | Promise<TargetState>

- A TransitionHookFn that redirects to a different state or params

- A TransitionHookFn that redirects to a different state or params

  Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);`

  See StateDeclaration.redirectTo

  #### Parameters

  - ##### trans Transition

  #### Returns TargetState | Promise<TargetState>

  - Defined in hooks/redirectTo.ts:16

- registerActivateViews(transitionService: TransitionService): Function

- #### Parameters

  - ##### transitionService TransitionService

  #### Returns Function

  - Defined in hooks/views.ts:52

- registerAddCoreResolvables(transitionService: TransitionService): Function

- #### Parameters

  - ##### transitionService TransitionService

  #### Returns Function

  - Defined in hooks/coreResolvables.ts:21

- registerEagerResolvePath(transitionService: TransitionService): Function

- #### Parameters

  - ##### transitionService TransitionService

  #### Returns Function

  - Defined in hooks/resolve.ts:27

- registerIgnoredTransitionHook(transitionService: TransitionService): Function

- #### Parameters

  - ##### transitionService TransitionService

  #### Returns Function

  - Defined in hooks/ignoredTransition.ts:34

- registerInvalidTransitionHook(transitionService: TransitionService): Function

- #### Parameters

  - ##### transitionService TransitionService

  #### Returns Function

  - Defined in hooks/invalidTransition.ts:19

- registerLazyLoadHook(transitionService: TransitionService): Function

- #### Parameters

  - ##### transitionService TransitionService

  #### Returns Function

  - Defined in hooks/lazyLoad.ts:69

- registerLazyResolveState(transitionService: TransitionService): Function

- #### Parameters

  - ##### transitionService TransitionService

  #### Returns Function

  - Defined in hooks/resolve.ts:45

- registerLoadEnteringViews(transitionService: TransitionService): Function

- #### Parameters

  - ##### transitionService TransitionService

  #### Returns Function

  - Defined in hooks/views.ts:26

- registerOnEnterHook(transitionService: TransitionService): Function

- #### Parameters

  - ##### transitionService TransitionService

  #### Returns Function

  - Defined in hooks/onEnterExitRetain.ts:61

- registerOnExitHook(transitionService: TransitionService): Function

- #### Parameters

  - ##### transitionService TransitionService

  #### Returns Function

  - Defined in hooks/onEnterExitRetain.ts:35

- registerOnRetainHook(transitionService: TransitionService): Function

- #### Parameters

  - ##### transitionService TransitionService

  #### Returns Function

  - Defined in hooks/onEnterExitRetain.ts:48

- registerRedirectToHook(transitionService: TransitionService): Function

- #### Parameters

  - ##### transitionService TransitionService

  #### Returns Function

  - Defined in hooks/redirectTo.ts:36

- registerResolveRemaining(transitionService: TransitionService): Function

- #### Parameters

  - ##### transitionService TransitionService

  #### Returns Function

  - Defined in hooks/resolve.ts:64

- registerUpdateGlobalState(transitionService: TransitionService): Function

- #### Parameters

  - ##### transitionService TransitionService

  #### Returns Function

  - Defined in hooks/updateGlobals.ts:39

- registerUpdateUrl(transitionService: TransitionService): Function

- #### Parameters

  - ##### transitionService TransitionService

  #### Returns Function

  - Defined in hooks/url.ts:30

- resolveRemaining(trans: Transition): Promise<any>

- A TransitionHookFn which resolves any dynamically added (LAZY or EAGER) Resolvables.

- A TransitionHookFn which resolves any dynamically added (LAZY or EAGER) Resolvables.

  Registered using `transitionService.onFinish({}, eagerResolvePath, { priority: 1000 });`

  After all entering states have been entered, this hook resolves any remaining Resolvables. These are typically dynamic resolves which were added by some Transition Hook using Transition.addResolvable.

  See StateDeclaration.resolve

  #### Parameters

  - ##### trans Transition

  #### Returns Promise<any>

  - Defined in hooks/resolve.ts:59

- treeChangesCleanup(trans: Transition): void

- #### Parameters

  - ##### trans Transition

  #### Returns void

  - Defined in hooks/coreResolvables.ts:31

- updateGlobalState(trans: Transition): void

- A TransitionHookFn which updates global UI-Router state

- A TransitionHookFn which updates global UI-Router state

  Registered using `transitionService.onBefore({}, updateGlobalState);`

  Before a Transition starts, updates the global value of "the current transition" ([[Globals.transition]]). After a successful Transition, updates the global values of "the current state" ([[Globals.current]] and [[Globals.$current]]) and "the current param values" ([[Globals.params]]).

  See also the deprecated properties: StateService.transition, StateService.current, StateService.params

  #### Parameters

  - ##### trans Transition

  #### Returns void

  - Defined in hooks/updateGlobals.ts:19

- updateUrl(transition: Transition): void

- A TransitionHookFn which updates the URL after a successful transition

- A TransitionHookFn which updates the URL after a successful transition

  Registered using `transitionService.onSuccess({}, updateUrl);`

  #### Parameters

  - ##### transition Transition

  #### Returns void

  - Defined in hooks/url.ts:13

Generated using TypeDoc