10
10
*/
11
11
12
12
/** for typedoc */
13
+ import { ng as angular } from '../angular' ;
14
+ import IInjectorService = angular . auto . IInjectorService ;
15
+ import { IRootScopeService , IQService , ILocationService , ILocationProvider , IHttpService , ITemplateCacheService } from 'angular' ;
16
+
13
17
import { UIRouter } from "ui-router-core" ;
14
18
import { services , $InjectorLike } from "ui-router-core" ;
15
19
import { bindFunctions , removeFrom , applyPairs , IInjectable } from "ui-router-core" ;
@@ -29,15 +33,6 @@ import {UrlMatcherFactory} from "ui-router-core";
29
33
import { getStateHookBuilder } from "./statebuilders/onEnterExitRetain" ;
30
34
import { ResolveContext } from "ui-router-core" ;
31
35
32
- import * as angular from 'angular' ;
33
- import IInjectorService = angular . auto . IInjectorService ;
34
- import IQService = angular . IQService ;
35
- import ILocationProvider = angular . ILocationProvider ;
36
- import ILocationService = angular . ILocationService ;
37
- import IHttpService = angular . IHttpService ;
38
- import ITemplateCacheService = angular . ITemplateCacheService ;
39
- import IScope = angular . IScope ;
40
-
41
36
/** @hidden */
42
37
let app = angular . module ( "ui.router.angular1" , [ ] ) ;
43
38
@@ -194,7 +189,7 @@ function $uiRouter($locationProvider: ILocationProvider) {
194
189
195
190
this . $get = $get ;
196
191
$get . $inject = [ '$location' , '$browser' , '$sniffer' , '$rootScope' , '$http' , '$templateCache' ] ;
197
- function $get ( $location : ILocationService , $browser : any , $sniffer : any , $rootScope : IScope , $http : IHttpService , $templateCache : ITemplateCacheService ) {
192
+ function $get ( $location : ILocationService , $browser : any , $sniffer : any , $rootScope : ng . IScope , $http : IHttpService , $templateCache : ITemplateCacheService ) {
198
193
199
194
// Bind $locationChangeSuccess to the listeners registered in LocationService.onChange
200
195
$rootScope . $on ( "$locationChangeSuccess" , evt => urlListeners . forEach ( fn => fn ( evt ) ) ) ;
@@ -291,7 +286,7 @@ angular.module('ui.router').factory('$resolve', <any> resolveFactory);
291
286
// $trace service
292
287
angular . module ( "ui.router" ) . service ( "$trace" , ( ) => trace ) ;
293
288
watchDigests . $inject = [ '$rootScope' ] ;
294
- export function watchDigests ( $rootScope : IScope ) {
289
+ export function watchDigests ( $rootScope : IRootScopeService ) {
295
290
$rootScope . $watch ( function ( ) { trace . approximateDigests ++ ; } ) ;
296
291
}
297
292
angular . module ( "ui.router" ) . run ( watchDigests ) ;
0 commit comments