TreeChanges | @uirouter/core
Options
All
  • Public
  • Public/Protected
  • All
Menu

TreeChanges encapsulates the various Paths that are involved in a Transition.

Get a TreeChanges object using Transition.treeChanges

A UI-Router Transition is from one Path in a State Tree to another Path. For a given Transition, this object stores the "to" and "from" paths, as well as subsets of those: the "retained", "exiting" and "entering" paths.

Each path in TreeChanges is an array of PathNode objects. Each PathNode in the array corresponds to a portion of a nested state.

For example, if you had a nested state named foo.bar.baz, it would have three portions, foo, bar, baz. If you transitioned to foo.bar.baz and inspected the TreeChanges.to Path, you would find a node in the array for each portion: foo, bar, and baz.


todo

show visual state tree

Hierarchy

  • TreeChanges

Indexable

[key: string]: PathNode[] | undefined

TreeChanges encapsulates the various Paths that are involved in a Transition.

Get a TreeChanges object using Transition.treeChanges

A UI-Router Transition is from one Path in a State Tree to another Path. For a given Transition, this object stores the "to" and "from" paths, as well as subsets of those: the "retained", "exiting" and "entering" paths.

Each path in TreeChanges is an array of PathNode objects. Each PathNode in the array corresponds to a portion of a nested state.

For example, if you had a nested state named foo.bar.baz, it would have three portions, foo, bar, baz. If you transitioned to foo.bar.baz and inspected the TreeChanges.to Path, you would find a node in the array for each portion: foo, bar, and baz.


nodoc

Index

Properties

entering

entering: PathNode[]

The path of nodes that the transition is entering.

After the Transition is successful, these nodes will be active. Because they are entering, they have their resolves fetched, onEnter hooks run, and their views (component(s) or controller(s)+template(s)) refreshed.

Note that a state that is reloaded (due to parameter values changing, or reload: true) may be in both the exiting and entering paths.

exiting

exiting: PathNode[]

The path of previously active nodes that the transition is exiting.

After the Transition is successful, these nodes are no longer active.

Note that a state that is being reloaded (due to parameter values changing, or reload: true) may be in both the exiting and entering paths.

from

from: PathNode[]

The path of nodes in the state tree that the transition is coming from

retained

retained: PathNode[]

The path of active nodes that the transition is retaining.

These nodes are neither exited, nor entered. Before and after the transition is successful, these nodes are active.

retainedWithToParams

retainedWithToParams: PathNode[]

The path of active nodes that the transition is retaining with updated "to params" applied.

These nodes are neither exited, nor entered. Before and after the transition is successful, these nodes are active.

This is a shallow copy of retained, but with new (dynamic) parameter values from to applied.

to

to: PathNode[]

The path of nodes in the state tree that the transition is going to

Generated using TypeDoc