Merge pull request #7532 from gradecam/IStateService.get

Support more variations of IStateService.get
This commit is contained in:
Masahiro Wakame
2016-01-11 23:06:48 +09:00
2 changed files with 10 additions and 2 deletions
+6 -1
View File
@@ -177,8 +177,13 @@ class UrlLocatorTestService implements IUrlLocatorTestService {
if (this.$state.href("myState") === "/myState") {
//
}
this.$state.get("myState");
this.$state.get();
this.$state.get("myState");
this.$state.get("myState", "yourState");
this.$state.get("myState", this.$state.current);
this.$state.get(this.$state.current);
this.$state.get(this.$state.current, "yourState");
this.$state.get(this.$state.current, this.$state.current);
this.$state.reload();
// http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$state#properties
+4 -1
View File
@@ -261,7 +261,10 @@ declare module angular.ui {
is(state: IState, params?: {}): boolean;
href(state: IState, params?: {}, options?: IHrefOptions): string;
href(state: string, params?: {}, options?: IHrefOptions): string;
get(state: string): IState;
get(state: string, context?: string): IState;
get(state: IState, context?: string): IState;
get(state: string, context?: IState): IState;
get(state: IState, context?: IState): IState;
get(): IState[];
/** A reference to the state's config object. However you passed it in. Useful for accessing custom data. */
current: IState;