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
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 State object from a raw StateDeclaration, this builder ensures that those hooks are injectable for angular-ui-router (ng1).
This is a StateBuilder.builder function for angular1 views
.
This is a StateBuilder.builder function for angular1 views
.
When the StateBuilder builds a State object from a raw StateDeclaration, this builder
handles the views
property with logic specific to angular-ui-router (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
.
Implementation of the legacy $resolve
service for angular 1.
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.
This API is no longer not part of the standard angular-ui-router
bundle.
For users of the prebuilt bundles, add the release/resolveService.min.js
UMD bundle.
For bundlers (webpack, browserify, etc), add angular-ui-router/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.
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' }
an object which looks like an StateDeclaration.resolve object; keys are resolve names and values are injectable functions
key/value pre-resolved data (locals)
a promise for a "parent resolve"
Generated using TypeDoc
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.