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

Class Resolvable

The basic building block for the resolve system.

Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise), and the unwrapped-when-complete (.data) result of the resolveFn.

Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the resolveFn) and returns the resulting promise.

Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first parameter to those fns.

Hierarchy

  • Resolvable

Index

Constructors

  • new Resolvable(name: string, resolveFn: Function, preResolvedData?: any): Resolvable

Properties

data: any
deps: string[]
name: string
promise: Promise<any>
resolveFn: Function

Methods

  • toString(): string
  • makeResolvables(resolves: object): Resolvables
  • Validates the result map as a "resolve:" style object, then transforms the resolves into Resolvables

  • Validates the result map as a "resolve:" style object, then transforms the resolves into Resolvables

    Parameters

    • resolves: object
      • [key: string]: Function

    Returns Resolvables


Generated using TypeDoc