PathNode | @uirouter/angular
Options
All
  • Public
  • Public/Protected
  • All
Menu

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

constructor

  • Creates a copy of a PathNode

    Parameters

    Returns PathNode

  • Creates a new (empty) PathNode for a State

    Parameters

    Returns PathNode

Properties

paramSchema

paramSchema: Param[]

The parameters declared on the state

paramValues

paramValues: {}

The parameter values that belong to the state

Type declaration

  • [key: string]: any

resolvables

resolvables: Resolvable[]

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

state

The state being entered, exited, or retained

views

views: ViewConfig[]

The state's declared view configuration objects

Methods

applyRawParams

  • Sets paramValues for the node, from the values of an object hash

    Parameters

    Returns PathNode

clone

  • Returns PathNode

diff

  • 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: PathNode

      The node to compare to

    • Optional paramsFn: GetParamsFn

      A function that returns which parameters should be compared.

    Returns Param[] | false

    The Params which differ, or null if the two nodes are for different states

equals

  • equals(node: PathNode, paramsFn?: GetParamsFn): boolean
  • Parameters

    • node: PathNode
    • Optional paramsFn: GetParamsFn

    Returns boolean

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

parameter

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

    Parameters

    • name: string

    Returns Param

Static clone

  • Returns a clone of the PathNode

    deprecated

    use instance method node.clone()

    Parameters

    Returns PathNode

Generated using TypeDoc