# Class PathNode

A node in a [[TreeChanges]] path

For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path. Each PathNode corresponds to a state being entered, exited, or retained. The stateful information includes parameter values and resolve data.

- Defined in router/path/path-node.js:11
- Defined in router/path/path-node.js:77

#####
Index

### Constructors

constructor

### Properties

paramSchema
paramValues
resolvables
state
views

### Methods

applyRawParams
clone
diff
equals
parameter
clone

##
Constructors

### constructor

- new PathNode(stateOrNode): PathNode

- #### Parameters

  - stateOrNode: any

  #### Returns PathNode

  - Defined in router/path/path-node.js:12

##
Properties

### paramSchema

paramSchema: any

- Defined in router/path/path-node.js:16
- Defined in router/path/path-node.js:23

### paramValues

paramValues: any

- Defined in router/path/path-node.js:17
- Defined in router/path/path-node.js:24
- Defined in router/path/path-node.js:37

### resolvables

resolvables: any

- Defined in router/path/path-node.js:18
- Defined in router/path/path-node.js:25

### state

state: any

- Defined in router/path/path-node.js:15
- Defined in router/path/path-node.js:22

### views

views: any

- Defined in router/path/path-node.js:19

##
Methods

### applyRawParams

- applyRawParams(params): PathNode

- Sets [[paramValues]] for the node, from the values of an object hash

  #### Parameters

  - params: any

  #### Returns PathNode

  - Defined in router/path/path-node.js:32

### clone

- clone(): PathNode

- #### Returns PathNode

  - Defined in router/path/path-node.js:28

### diff

- diff(node, paramsFn): any

- Finds Params with different parameter values on another PathNode.

  Given another node (of the same state), finds the parameter values which differ. Returns the [[Param]] (schema objects) whose parameter values differ.

  Given another node for a different state, returns `false`

  #### Parameters

  - node: any

    The node to compare to

  - paramsFn: any

    A function that returns which parameters should be compared.

  #### Returns any

  The [[Param]]s which differ, or null if the two nodes are for different states

  - Defined in router/path/path-node.js:67

### equals

- equals(node, paramsFn): boolean

- #### Parameters

  - node: any
  - paramsFn: any

  #### Returns boolean

  true if the state and parameter values for another PathNode are equal to the state and param values for this PathNode

  - Defined in router/path/path-node.js:51

### parameter

- parameter(name): undefined

- Gets a specific [[Param]] metadata that belongs to the node

  #### Parameters

  - name: any

  #### Returns undefined

  - Defined in router/path/path-node.js:44

### `Static` clone

- clone(node): any

- Returns a clone of the PathNode

  #### Parameters

  - node: any

  #### Returns any

  #### Deprecated

  use instance method `node.clone()`

  - Defined in router/path/path-node.js:77