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

id: number = 0
mod_cmpt: any = angular.module('ui.router.compat', ['ui.router'])
mod_init: any = angular.module('ui.router.init', [])
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', ['ng', 'ui.router.init'])
router: UIRouter = null

Functions

  • $IncludedByStateFilter($state: StateService): any
  • $IsStateFilter($state: StateService): 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))[]
  • getStateHookBuilder(hookName: "onEnter" | "onExit" | "onRetain"): stateHookBuilder
  • This is a StateBuilder.builder function for angular1 onEnter, onExit, onRetain callback hooks on a Ng1StateDeclaration.

  • hasAnyKey(keys: any, obj: any): any
  • ng1ViewsBuilder(state: StateObject): object
  • This is a StateBuilder.builder function for angular1 views.

  • runBlock($injector: IInjectorService, $q: IQService, $uiRouter: UIRouter): void
  • watchDigests($rootScope: IRootScopeService): 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