@@ -24,7 +24,7 @@ import {
24
24
unnestR ,
25
25
ViewService ,
26
26
} from '@uirouter/core' ;
27
- import { IAugmentedJQuery , IInterpolateService , IScope , ITimeoutService , ITranscludeFunction } from 'angular' ;
27
+ import { IAugmentedJQuery , IInterpolateService , IScope , ITranscludeFunction } from 'angular' ;
28
28
import { ng as angular } from '../angular' ;
29
29
import { Ng1Controller , Ng1StateDeclaration } from '../interface' ;
30
30
import { getLocals } from '../services' ;
@@ -170,6 +170,7 @@ export type UIViewAnimData = {
170
170
* ```
171
171
*/
172
172
export let uiView : ng1_directive ;
173
+ // eslint-disable-next-line prefer-const
173
174
uiView = [
174
175
'$view' ,
175
176
'$animate' ,
@@ -183,7 +184,7 @@ uiView = [
183
184
$interpolate : IInterpolateService ,
184
185
$q : $QLike
185
186
) {
186
- function getRenderer ( attrs : Obj , scope : IScope ) {
187
+ function getRenderer ( ) {
187
188
return {
188
189
enter : function ( element : JQuery , target : any , cb : Function ) {
189
190
if ( angular . version . minor > 2 ) {
@@ -221,15 +222,11 @@ uiView = [
221
222
return function ( scope : IScope , $element : IAugmentedJQuery , attrs : Obj ) {
222
223
const onloadExp = attrs [ 'onload' ] || '' ,
223
224
autoScrollExp = attrs [ 'autoscroll' ] ,
224
- renderer = getRenderer ( attrs , scope ) ,
225
+ renderer = getRenderer ( ) ,
225
226
inherited = $element . inheritedData ( '$uiView' ) || rootData ,
226
227
name = $interpolate ( attrs [ 'uiView' ] || attrs [ 'name' ] || '' ) ( scope ) || '$default' ;
227
228
228
- let previousEl : JQuery ,
229
- currentEl : JQuery ,
230
- currentScope : IScope ,
231
- viewConfig : Ng1ViewConfig ,
232
- unregister : Function ;
229
+ let previousEl : JQuery , currentEl : JQuery , currentScope : IScope , viewConfig : Ng1ViewConfig ;
233
230
234
231
const activeUIView : ActiveUIView = {
235
232
$type : 'ng1' ,
@@ -263,7 +260,7 @@ uiView = [
263
260
264
261
updateView ( ) ;
265
262
266
- unregister = $view . registerUIView ( activeUIView ) ;
263
+ const unregister = $view . registerUIView ( activeUIView ) ;
267
264
scope . $on ( '$destroy' , function ( ) {
268
265
trace . traceUIViewEvent ( 'Destroying/Unregistering' , activeUIView ) ;
269
266
unregister ( ) ;
@@ -363,16 +360,15 @@ uiView = [
363
360
} ,
364
361
] ;
365
362
366
- $ViewDirectiveFill . $inject = [ '$compile' , '$controller' , '$transitions' , '$view' , '$q' , '$timeout' ] ;
363
+ $ViewDirectiveFill . $inject = [ '$compile' , '$controller' , '$transitions' , '$view' , '$q' ] ;
367
364
368
365
/** @hidden */
369
366
function $ViewDirectiveFill (
370
367
$compile : angular . ICompileService ,
371
368
$controller : angular . IControllerService ,
372
369
$transitions : TransitionService ,
373
370
$view : ViewService ,
374
- $q : angular . IQService ,
375
- $timeout : ITimeoutService
371
+ $q : angular . IQService
376
372
) {
377
373
const getControllerAs = parse ( 'viewDecl.controllerAs' ) ;
378
374
const getResolveAs = parse ( 'viewDecl.resolveAs' ) ;
0 commit comments