A internal global service

StateBuilder is a factory for the internal [[StateObject]] objects.

When you register a state with the [[StateRegistry]], you register a plain old javascript object which conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding [[StateObject]] object, which has an API and is used internally.

Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function using the [[builder]] method.

Constructors

Properties

$injector: any
builders: {
    data: ((state: any) => any)[];
    includes: ((state: any) => any)[];
    name: ((state: any) => any)[];
    navigable: ((state: any) => any)[];
    params: ((state: any) => any)[];
    parent: ((state: any) => any)[];
    path: ((state: any) => any)[];
    resolvables: ((state: any) => any[])[];
    self: ((state: any) => any)[];
    url: ((stateObject: any) => any)[];
    views: any[];
}
matcher: any

Methods

  • Builds all of the properties on an essentially blank State object, returning a State object which has all its properties and API built.

    Parameters

    • state: any

      an uninitialized State object

    Returns any

    the built State object