@@ -29,11 +29,11 @@ import {UrlMatcherFactory} from "../url/urlMatcherFactory";
29
29
import { getStateHookBuilder } from "./statebuilders/onEnterExitRetain" ;
30
30
import { ResolveContext } from "../resolve/resolveContext" ;
31
31
32
+ import * as angular from 'angular' ;
32
33
import IInjectorService = angular . auto . IInjectorService ;
33
34
import IQService = angular . IQService ;
34
35
import ILocationProvider = angular . ILocationProvider ;
35
36
import ILocationService = angular . ILocationService ;
36
- import IBrowserService = angular . IBrowserService ;
37
37
import IHttpService = angular . IHttpService ;
38
38
import ITemplateCacheService = angular . ITemplateCacheService ;
39
39
import IScope = angular . IScope ;
@@ -165,7 +165,7 @@ function $uiRouter($locationProvider: ILocationProvider) {
165
165
166
166
// Create a new instance of the Router when the $uiRouterProvider is initialized
167
167
router = new UIRouter ( ) ;
168
-
168
+
169
169
// Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties
170
170
router . stateRegistry . decorator ( "views" , ng1ViewsBuilder ) ;
171
171
router . stateRegistry . decorator ( "onExit" , getStateHookBuilder ( "onExit" ) ) ;
@@ -186,7 +186,7 @@ function $uiRouter($locationProvider: ILocationProvider) {
186
186
187
187
this . $get = $get ;
188
188
$get . $inject = [ '$location' , '$browser' , '$sniffer' , '$rootScope' , '$http' , '$templateCache' ] ;
189
- function $get ( $location : ILocationService , $browser : IBrowserService , $sniffer : any , $rootScope : IScope , $http : IHttpService , $templateCache : ITemplateCacheService ) {
189
+ function $get ( $location : ILocationService , $browser : any , $sniffer : any , $rootScope : IScope , $http : IHttpService , $templateCache : ITemplateCacheService ) {
190
190
191
191
// Bind $locationChangeSuccess to the listeners registered in LocationService.onChange
192
192
$rootScope . $on ( "$locationChangeSuccess" , evt => urlListeners . forEach ( fn => fn ( evt ) ) ) ;
@@ -197,14 +197,14 @@ function $uiRouter($locationProvider: ILocationProvider) {
197
197
html5Mode = isObject ( html5Mode ) ? html5Mode . enabled : html5Mode ;
198
198
return html5Mode && $sniffer . history ;
199
199
} ;
200
-
200
+
201
201
services . location . setUrl = ( newUrl : string , replace = false ) => {
202
- $location . url ( newUrl )
202
+ $location . url ( newUrl ) ;
203
203
if ( replace ) $location . replace ( ) ;
204
204
} ;
205
205
206
206
services . template . get = ( url : string ) =>
207
- $http . get ( url , { cache : $templateCache , headers : { Accept : 'text/html' } } ) . then ( prop ( "data" ) ) ;
207
+ $http . get ( url , { cache : $templateCache , headers : { Accept : 'text/html' } } ) . then ( prop ( "data" ) ) as any ;
208
208
209
209
// Bind these LocationService functions to $location
210
210
bindFunctions ( $location , services . location , $location , [ "replace" , "url" , "path" , "search" , "hash" ] ) ;
@@ -223,7 +223,7 @@ angular.module('ui.router.init', []).provider("$uiRouter", <any> $uiRouter);
223
223
runBlock . $inject = [ '$injector' , '$q' ] ;
224
224
function runBlock ( $injector : IInjectorService , $q : IQService ) {
225
225
services . $injector = $injector ;
226
- services . $q = $q ;
226
+ services . $q = < any > $q ;
227
227
}
228
228
229
229
angular . module ( 'ui.router.init' ) . run ( runBlock ) ;
@@ -419,7 +419,7 @@ var $urlMatcherFactory: UrlMatcherFactory;
419
419
420
420
/**
421
421
* An injectable service used to configure the URL.
422
- *
422
+ *
423
423
* This service is used to set url mapping options, and create [[UrlMatcher]] objects.
424
424
*
425
425
* This angular service exposes the [[UrlMatcherFactory]] singleton at config-time.
0 commit comments