mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
Add access to $state.$current.locals.globals
This commit is contained in:
@@ -148,6 +148,10 @@ class UrlLocatorTestService implements IUrlLocatorTestService {
|
||||
this.$state.get("myState");
|
||||
this.$state.get();
|
||||
this.$state.reload();
|
||||
|
||||
// Accesses the currently resolved values for the current state
|
||||
// http://stackoverflow.com/questions/28026620/is-there-a-way-to-access-resolved-state-dependencies-besides-injecting-them-into/28027023#28027023
|
||||
var resolvedValues = this.$state.$current.locals.globals;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+11
@@ -168,6 +168,17 @@ declare module angular.ui {
|
||||
current: IState;
|
||||
params: IStateParamsService;
|
||||
reload(): void;
|
||||
|
||||
$current: IStateServiceUtilities;
|
||||
}
|
||||
|
||||
interface IStateServiceUtilities {
|
||||
locals: {
|
||||
/**
|
||||
* Currently resolved "resolve" values from the current state
|
||||
*/
|
||||
globals: { [key: string]: any; };
|
||||
};
|
||||
}
|
||||
|
||||
interface IStateParamsService {
|
||||
|
||||
Reference in New Issue
Block a user