|
2 | 2 | import {extend, bindFunctions, IInjectable} from "../common/common";
|
3 | 3 | import {isFunction, isString, isDefined, isArray} from "../common/predicates";
|
4 | 4 | import {UrlMatcher} from "./urlMatcher";
|
5 |
| -import {services, $InjectorLike} from "../common/coreservices"; |
| 5 | +import {services, $InjectorLike, LocationServices} from "../common/coreservices"; |
6 | 6 | import {UrlMatcherFactory} from "./urlMatcherFactory";
|
7 | 7 | import {StateParams} from "../params/stateParams";
|
8 |
| -import IInjectorService = angular.auto.IInjectorService; |
9 | 8 | import {RawParams} from "../params/interface";
|
10 |
| -import ILocationService = angular.ILocationService; |
11 | 9 |
|
12 | 10 | /** @hidden */
|
13 | 11 | let $location = services.location;
|
@@ -75,7 +73,7 @@ export class UrlRouterProvider {
|
75 | 73 | /** @hidden */
|
76 | 74 | rules: Function[] = [];
|
77 | 75 | /** @hidden */
|
78 |
| - otherwiseFn: ($injector: IInjectorService, $location: ILocationService) => string; |
| 76 | + otherwiseFn: ($injector: $InjectorLike, $location: LocationServices) => string; |
79 | 77 | /** @hidden */
|
80 | 78 | interceptDeferred = false;
|
81 | 79 |
|
@@ -121,7 +119,7 @@ export class UrlRouterProvider {
|
121 | 119 | *
|
122 | 120 | * @return [[$urlRouterProvider]] (`this`)
|
123 | 121 | */
|
124 |
| - rule(rule: ($injector: IInjectorService, $location: ILocationService) => string): UrlRouterProvider { |
| 122 | + rule(rule: ($injector: $InjectorLike, $location: LocationServices) => string): UrlRouterProvider { |
125 | 123 | if (!isFunction(rule)) throw new Error("'rule' must be a function");
|
126 | 124 | this.rules.push(rule);
|
127 | 125 | return this;
|
@@ -154,7 +152,7 @@ export class UrlRouterProvider {
|
154 | 152 | *
|
155 | 153 | * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance
|
156 | 154 | */
|
157 |
| - otherwise(rule: string | (($injector: IInjectorService, $location: ILocationService) => string)): UrlRouterProvider { |
| 155 | + otherwise(rule: string | (($injector: $InjectorLike, $location: LocationServices) => string)): UrlRouterProvider { |
158 | 156 | if (!isFunction(rule) && !isString(rule)) throw new Error("'rule' must be a string or function");
|
159 | 157 | this.otherwiseFn = isString(rule) ? () => rule : rule;
|
160 | 158 | return this;
|
|
0 commit comments