state | @uirouter/angularjs
Options
Menu

Module state

This subsystem implements the ui-router state tree

Index

Type aliases

BuilderFunction: function

Type declaration

OnInvalidCallback: function

Type declaration

RedirectToResult: string | TargetState | object | void

The return value of a redirectTo function

The return value of a redirectTo function

  • string: a state name
  • TargetState: a target state, parameters, and options
  • object: an object with a state name and parameters
StateOrName: string | StateDeclaration | StateObject
StateRegistryListener: function

The signature for the callback function provided to StateRegistry.onStatesChanged.

The signature for the callback function provided to StateRegistry.onStatesChanged.

This callback receives two parameters:

param

a string; either "registered" or "deregistered"

param

the list of StateDeclarations that were registered (or deregistered).

Type declaration

    • (event: "registered" | "deregistered", states: StateDeclaration[]): void
    • Parameters

      • event "registered" | "deregistered"
      • states StateDeclaration[]

      Returns void

_StateDeclaration: StateDeclaration | object

Either a StateDeclaration or an ES6 class that implements StateDeclaration The ES6 class constructor should have no arguments.

Either a StateDeclaration or an ES6 class that implements StateDeclaration The ES6 class constructor should have no arguments.

Functions

  • Parameters

    Returns any


  • getNavigableBuilder(isRoot: function): navigableBuilder
  • Parameters

    Returns navigableBuilder


  • getParamsBuilder(paramFactory: ParamFactory): paramsBuilder
  • Parameters

    Returns paramsBuilder


  • getUrlBuilder($urlMatcherFactoryProvider: UrlMatcherFactory, root: function): urlBuilder
  • Parameters

    Returns urlBuilder


  • Parameters

    Returns object

    • [name: string]: boolean

  • Parameters

    Returns string


  • parseUrl(url: string): any
  • Parameters

    • url string

    Returns any


  • Parameters

    Returns StateObject<>[]


  • This is a StateBuilder.builder function for the resolve: block on a StateDeclaration.

    When the StateBuilder builds a StateObject object from a raw StateDeclaration, this builder validates the resolve property and converts it to a Resolvable array.

    resolve: input value can be:

    { // analyzed but not injected myFooResolve: function() { return "myFooData"; },

    // function.toString() parsed, "DependencyName" dep as string (not min-safe) myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() },

    // Array split; "DependencyName" dep as string myBazResolve: [ "DependencyName", function(dep) { return dep.fetchSomethingAsPromise() },

    // Array split; DependencyType dep as token (compared using ===) myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() },

    // val.$inject used as deps // where: // corgeResolve.$inject = ["DependencyName"]; // function corgeResolve(dep) { dep.fetchSometingAsPromise() } // then "DependencyName" dep as string myCorgeResolve: corgeResolve,

    // inject service by name // When a string is found, desugar creating a resolve that injects the named service myGraultResolve: "SomeService" }

    or:

    [ new Resolvable("myFooResolve", function() { return "myFooData" }), new Resolvable("myBarResolve", function(dep) { return dep.fetchSomethingAsPromise() }, [ "DependencyName" ]), { provide: "myBazResolve", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ "DependencyName" ] } ]

    Parameters

    Returns Resolvable[]


  • Parameters


Generated using TypeDoc