# Class StateObject

Internal representation of a ng-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]].

- Defined in router/state/state-object.js:15
- Defined in router/state/state-object.js:102
- Defined in router/state/state-object.js:104

#####
Index

### Constructors

constructor

### Properties

$$state
__stateObjectCache
name
navigable
params
parent
self
url

### Methods

fqn
is
parameter
parameters
root
toString
isState
isStateDeclaration

##
Constructors

### constructor

- new StateObject(config): StateObject

- #### Parameters

  - config: any

  #### Returns StateObject

  - Defined in router/state/state-object.js:23

##
Properties

### $$state

$$state: (() => StateObject)

- Defined in router/state/state-object.js:25

### __stateObjectCache

__stateObjectCache: {
nameGlob: Glob;
}

- Defined in router/state/state-object.js:28

### name

name: any = undefined

- Defined in router/state/state-object.js:16

### navigable

navigable: any = undefined

- Defined in router/state/state-object.js:17

### params

params: any = undefined

- Defined in router/state/state-object.js:20

### parent

parent: StateObject = undefined

- Defined in router/state/state-object.js:19

### self

self: any

- Defined in router/state/state-object.js:26

### url

url: any = undefined

- Defined in router/state/state-object.js:21

##
Methods

### fqn

- fqn(): any

- #### Returns any

  Returns a dot-separated name of the state.

  #### Deprecated

  this does not properly handle dot notation

  - Defined in router/state/state-object.js:48

### is

- is(ref): boolean

- 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: any

    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 router/state/state-object.js:41

### parameter

- parameter(id, opts?): any

- Returns a single [[Param]] that is owned by the state

  If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s.

  #### Parameters

  - id: any

    the name of the [[Param]] to return

  - opts: {} = {}

    options

  #### Returns any

  - Defined in router/state/state-object.js:90

### parameters

- parameters(opts): any

- 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: any

    options

  #### Returns any

  - Defined in router/state/state-object.js:71

### root

- root(): any

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

  #### Returns any

  The root of this state's tree.

  - Defined in router/state/state-object.js:59

### toString

- toString(): any

- #### Returns any

  - Defined in router/state/state-object.js:97

### `Static` isState

- isState(obj): boolean

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

  #### Parameters

  - obj: any

  #### Returns boolean

  - Defined in router/state/state-object.js:104

### `Static` isStateDeclaration

- isStateDeclaration(obj): boolean

- Predicate which returns true if the object is a [[StateDeclaration]] object

  #### Parameters

  - obj: any

  #### Returns boolean

  - Defined in router/state/state-object.js:102