ng1 | @uirouter/angularjs
Options
Menu

Angular 1 types

UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc. The customizations to the core types for Angular UI-Router are documented here.

The optional $resolve service is also documented here.

Index

Variables

mod_cmpt: any = angular.module('ui.router.compat', ['ui.router'])
mod_init: any = angular.module('ui.router.init', ['ng'])
mod_main: any = angular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1'])
mod_rtr: any = angular.module('ui.router.router', ['ui.router.util'])
mod_state: any = angular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1'])
mod_util: any = angular.module('ui.router.util', ['ui.router.init'])
router: UIRouter = null

Functions

  • $IncludedByStateFilter($state: StateService): any
  • Parameters

    • $state StateService

    Returns any


  • $IsStateFilter($state: StateService): any
  • Parameters

    • $state StateService

    Returns any


  • $uiRouterProvider($locationProvider: ILocationProvider): UIRouter
  • This angular 1 provider instantiates a Router and exposes its services via the angular injector

  • This angular 1 provider instantiates a Router and exposes its services via the angular injector

    Parameters

    • $locationProvider ILocationProvider

    Returns UIRouter



  • getProviderFor(serviceName: any): (string | (Anonymous function))[]
  • Parameters

    • serviceName any

    Returns (string | (Anonymous function))[]


  • getStateHookBuilder(hookName: "onEnter" | "onExit" | "onRetain"): stateHookBuilder
  • This is a StateBuilder.builder function for angular1 onEnter, onExit, onRetain callback hooks on a Ng1StateDeclaration.

  • This is a StateBuilder.builder function for angular1 onEnter, onExit, onRetain callback hooks on a Ng1StateDeclaration.

    When the StateBuilder builds a StateObject object from a raw StateDeclaration, this builder ensures that those hooks are injectable for @uirouter/angularjs (ng1).

    Parameters

    • hookName "onEnter" | "onExit" | "onRetain"

    Returns stateHookBuilder


  • Returns StateProvider | object


  • Parameters

    • uiRouter UIRouter

  • hasAnyKey(keys: any, obj: any): any
  • Parameters

    • keys any
    • obj any

    Returns any


  • ng1ViewsBuilder(state: StateObject): object
  • This is a StateBuilder.builder function for angular1 views.

  • This is a StateBuilder.builder function for angular1 views.

    When the StateBuilder builds a StateObject object from a raw StateDeclaration, this builder handles the views property with logic specific to @uirouter/angularjs (ng1).

    If no views: {} property exists on the StateDeclaration, then it creates the views object and applies the state-level configuration to a view named $default.

    Parameters

    • state StateObject

    Returns object


  • runBlock($injector: IInjectorService, $q: IQService, $uiRouter: UIRouter): void
  • Parameters

    • $injector IInjectorService
    • $q IQService
    • $uiRouter UIRouter

    Returns void


  • watchDigests($rootScope: IRootScopeService): void
  • Parameters

    • $rootScope IRootScopeService

    Returns void


Object literals

$resolve: object

Implementation of the legacy $resolve service for angular 1.

Implementation of the legacy $resolve service for angular 1.

  • resolve(invocables: object, locals?: object, parent?: Promise<any>): Promise<object>
  • Asynchronously injects a resolve block.

  • Asynchronously injects a resolve block.

    This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.

    Not bundled by default

    This API is no longer not part of the standard @uirouter/angularjs bundle. For users of the prebuilt bundles, add the release/resolveService.min.js UMD bundle. For bundlers (webpack, browserify, etc), add @uirouter/angularjs/lib/legacy/resolveService.


    Given an object invocables, where keys are strings and values are injectable functions, injects each function, and waits for the resulting promise to resolve. When all resulting promises are resolved, returns the results as an object.

    Example:

    let invocables = {
      foo: [ '$http', ($http) =>
               $http.get('/api/foo').then(resp => resp.data) ],
      bar: [ 'foo', '$http', (foo, $http) =>
               $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]
    }
    $resolve.resolve(invocables)
        .then(results => console.log(results.foo, results.bar))
    // Logs foo and bar:
    // { id: 123, barId: 456, fooData: 'foo data' }
    // { id: 456, barData: 'bar data' }

    Parameters

    • invocables object
      :

      an object which looks like an StateDeclaration.resolve object; keys are resolve names and values are injectable functions

      • [key: string]: Function
    • locals: Default value  object = {}
      :

      key/value pre-resolved data (locals)

    • parent: Optional  Promise<any>
      :

      a promise for a "parent resolve"

    Returns Promise<object>


Generated using TypeDoc