# Interface TreeChanges

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

interface TreeChanges {
entering: PathNode[];
exiting: PathNode[];
from: PathNode[];
retained: PathNode[];
retainedWithToParams: PathNode[];
to: PathNode[];
[key: string]: PathNode[];
}

#### Indexable

- [key: string]: PathNode[]

  #### Nodoc

- Defined in src/router/transition/interface.ts:128

##### Index

### Properties

entering
exiting
from
retained
retainedWithToParams
to

## 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.

- Defined in src/router/transition/interface.ts:176

### 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.

- Defined in src/router/transition/interface.ts:164

### from

from: PathNode[]

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

- Defined in src/router/transition/interface.ts:133

### 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.

- Defined in src/router/transition/interface.ts:144

### 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.

- Defined in src/router/transition/interface.ts:154

### to

to: PathNode[]

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

- Defined in src/router/transition/interface.ts:136