Internal representation of a UI-Router state.

Instances of this class are created when a StateDeclaration is registered with the StateRegistry.

A registered StateDeclaration is augmented with a getter (StateDeclaration.$$state) which returns the corresponding StateObject object.

This class prototypally inherits from the corresponding StateDeclaration. Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the StateBuilder.

### Hierarchy

- StateObject

## Index

### Constructors

- constructor

### Properties

- abstract
- data
- includes
- lazyLoad
- name
- navigable
- onEnter
- onExit
- onRetain
- params
- parent
- path
- redirectTo
- resolvables
- resolve
- resolvePolicy
- self
- url
- views

### Methods

- fqn
- is
- parameter
- parameters
- root
- toString
- create
- isState
- isStateClass

## Constructors

- new StateObject(config?: StateDeclaration): StateObject

- deprecated

    use State.create()

  #### Parameters

  - ##### config: Optional StateDeclaration

  #### Returns StateObject

  - Defined in state/stateObject.ts:135

## Properties

abstract: boolean

Prototypally inherits from StateDeclaration.abstract

Prototypally inherits from StateDeclaration.abstract

- Defined in state/stateObject.ts:36

data: any

Prototypally inherits from StateDeclaration.data Note: This is the only field on the StateDeclaration which is mutated. The definition object's `data` field is replaced with a new object which prototypally inherits from the parent state definition's `data` field.

Prototypally inherits from StateDeclaration.data Note: This is the only field on the StateDeclaration which is mutated. The definition object's `data` field is replaced with a new object which prototypally inherits from the parent state definition's `data` field.

- Defined in state/stateObject.ts:78

includes: object

An object containing the parent States' names as keys and true as their values.

An object containing the parent States' names as keys and true as their values.

#### Type declaration

- ##### [name: string]: boolean

- Defined in state/stateObject.ts:84

lazyLoad: function

Prototypally inherits from StateDeclaration.lazyLoad

Prototypally inherits from StateDeclaration.lazyLoad

#### Type declaration

- - (transition: Transition, state: StateDeclaration): Promise<LazyLoadResult>

  - #### Parameters

    - ##### transition Transition

    - ##### state StateDeclaration

    #### Returns Promise<LazyLoadResult>

- Defined in state/stateObject.ts:94

name: string

The name used to register the state

The name used to register the state

- Defined in state/stateObject.ts:33

navigable: StateObject

The nearest parent StateObject which has a URL

The nearest parent StateObject which has a URL

- Defined in state/stateObject.ts:67

onEnter: TransitionStateHookFn

Prototypally inherits from StateDeclaration.onEnter

Prototypally inherits from StateDeclaration.onEnter

- Defined in state/stateObject.ts:91

onExit: TransitionStateHookFn

Prototypally inherits from StateDeclaration.onExit

Prototypally inherits from StateDeclaration.onExit

- Defined in state/stateObject.ts:87

onRetain: TransitionStateHookFn

Prototypally inherits from StateDeclaration.onRetain

Prototypally inherits from StateDeclaration.onRetain

- Defined in state/stateObject.ts:89

params: object

The parameters for the state, built from the URL and StateDeclaration.params

The parameters for the state, built from the URL and StateDeclaration.params

#### Type declaration

- ##### [key: string]: Param

- Defined in state/stateObject.ts:51

parent: StateObject

The parent StateObject

The parent StateObject

- Defined in state/stateObject.ts:30

path: StateObject[]

The parent StateObject objects from this state up to the root

The parent StateObject objects from this state up to the root

- Defined in state/stateObject.ts:70

redirectTo: string | function | object

Prototypally inherits from StateDeclaration.redirectTo

Prototypally inherits from StateDeclaration.redirectTo

- Defined in state/stateObject.ts:97

resolvables: Resolvable[]

A list of Resolvable objects. The internal representation of resolve.

A list of Resolvable objects. The internal representation of resolve.

- Defined in state/stateObject.ts:42

resolve: any[] | object

Prototypally inherits from StateDeclaration.resolve

Prototypally inherits from StateDeclaration.resolve

- Defined in state/stateObject.ts:39

resolvePolicy: any

Prototypally inherits from StateDeclaration.resolvePolicy

Prototypally inherits from StateDeclaration.resolvePolicy

- Defined in state/stateObject.ts:45

self: StateDeclaration

The original StateDeclaration used to build this StateObject. Note: `this` object also prototypally inherits from the `self` declaration object.

The original StateDeclaration used to build this StateObject. Note: `this` object also prototypally inherits from the `self` declaration object.

- Defined in state/stateObject.ts:64

url: UrlMatcher

A compiled URLMatcher which detects when the state's URL is matched

A compiled URLMatcher which detects when the state's URL is matched

- Defined in state/stateObject.ts:48

views: object

The views for the state. Note: `@uirouter/core` does not register a builder for views. The framework specific code should register a `views` builder.

The views for the state. Note: `@uirouter/core` does not register a builder for views. The framework specific code should register a `views` builder.

#### Type declaration

- ##### [key: string]: _ViewDeclaration

- Defined in state/stateObject.ts:58

## Methods

- fqn(): string

- deprecated

    this does not properly handle dot notation

  #### Returns string

  :

  Returns a dot-separated name of the state.

  - Defined in state/stateObject.ts:162

- is(ref: StateObject | StateDeclaration | string): boolean

- Returns true if the provided parameter is the same state.

- Returns true if the provided parameter is the same state.

  Compares the identity of the state against the passed value, which is either an object reference to the actual `State` instance, the original definition object passed to `$stateProvider.state()`, or the fully-qualified name.

  #### Parameters

  - ##### ref StateObject | StateDeclaration | string

    :

    Can be one of (a) a `State` instance, (b) an object that was passed into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string.

  #### Returns boolean

  :

  Returns `true` if `ref` matches the current `State` instance.

  - Defined in state/stateObject.ts:154

- parameter(id: string, opts?: object): Param

- Returns a single Param that is owned by the state

- Returns a single Param that is owned by the state

  If `opts.inherit` is true, it also searches the ancestor states` Params.

  #### Parameters

  - ##### id string

    :

    the name of the Param to return

  - ##### opts: Default value object = {}

    :

    options

    - ##### Optional inherit?: boolean

  #### Returns Param

  - Defined in state/stateObject.ts:200

- parameters(opts?: object): Param[]

- Gets the state's `Param` objects

- Gets the state's `Param` objects

  Gets the list of Param objects owned by the state. If `opts.inherit` is true, it also includes the ancestor states' Param objects. If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object

  #### Parameters

  - ##### opts: Optional object

    :

    options

    - ##### Optional inherit?: boolean

    - ##### Optional matchingKeys?: any

  #### Returns Param[]

  - Defined in state/stateObject.ts:186

- root(): StateObject

- Returns the root node of this state's tree.

- Returns the root node of this state's tree.

  #### Returns StateObject

  :

  The root of this state's tree.

  - Defined in state/stateObject.ts:173

- toString(): string

- #### Returns string

  - Defined in state/stateObject.ts:208

- create(stateDecl: _StateDeclaration): StateObject

- Create a state object to put the private/internal implementation details onto. The object's prototype chain looks like: (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...)

- Create a state object to put the private/internal implementation details onto. The object's prototype chain looks like: (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...)

  #### Parameters

  - ##### stateDecl _StateDeclaration

    :

    the user-supplied State Declaration

  #### Returns StateObject

  :

  an internal State object

  - Defined in state/stateObject.ts:117

- isState(obj: any): boolean

- Predicate which returns true if the object is an internal StateObject object

- Predicate which returns true if the object is an internal StateObject object

  #### Parameters

  - ##### obj any

  #### Returns boolean

  - Defined in state/stateObject.ts:134

- isStateClass(stateDecl: _StateDeclaration): boolean

- Predicate which returns true if the object is an class with @State() decorator

- Predicate which returns true if the object is an class with @State() decorator

  #### Parameters

  - ##### stateDecl _StateDeclaration

  #### Returns boolean

  - Defined in state/stateObject.ts:130

Generated using TypeDoc