PathNode | UI-Router
Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Hierarchy

  • PathNode

Index

Constructors

  • new PathNode(state: PathNode): PathNode
  • Creates a copy of a PathNode

  • new PathNode(state: State): PathNode
  • Creates a new (empty) PathNode for a State

Properties

paramSchema: Param[]

The parameters declared on the state

The parameters declared on the state

paramValues: object

The parameter values that belong to the state

The parameter values that belong to the state

Type declaration

  • [key: string]: any
resolvables: Resolvable[]

The individual (stateful) resolvable objects that belong to the state

The individual (stateful) resolvable objects that belong to the state

state: State

The state being entered, exited, or retained

The state being entered, exited, or retained

views: ViewConfig[]

The state's declared view configuration objects

The state's declared view configuration objects

Methods

  • equals(node: PathNode, keys?: Array<string>): boolean
  • Parameters

    • node: PathNode
    • keys Default value: Array<string> = this.paramSchema.map(p => p.id)

    Returns boolean

    :

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


  • parameter(name: string): Param
  • Gets a specific Param metadata that belongs to the node

  • matching(pathA: PathNode[], pathB: PathNode[]): PathNode[]
  • Returns a new path which is a subpath of the first path which matched the second path.

  • Returns a new path which is a subpath of the first path which matched the second path.

    The new path starts from root and contains any nodes that match the nodes in the second path. Nodes are compared using their state property and parameter values.

    Parameters

    Returns PathNode[]


Generated using TypeDoc