@@ -24,7 +24,7 @@ import {
2424 unnestR ,
2525 ViewService ,
2626} from '@uirouter/core' ;
27- import { IAugmentedJQuery , IInterpolateService , IScope , ITimeoutService , ITranscludeFunction } from 'angular' ;
27+ import { IAugmentedJQuery , IInterpolateService , IScope , ITranscludeFunction } from 'angular' ;
2828import { ng as angular } from '../angular' ;
2929import { Ng1Controller , Ng1StateDeclaration } from '../interface' ;
3030import { getLocals } from '../services' ;
@@ -170,6 +170,7 @@ export type UIViewAnimData = {
170170 * ```
171171 */
172172export let uiView : ng1_directive ;
173+ // eslint-disable-next-line prefer-const
173174uiView = [
174175 '$view' ,
175176 '$animate' ,
@@ -183,7 +184,7 @@ uiView = [
183184 $interpolate : IInterpolateService ,
184185 $q : $QLike
185186 ) {
186- function getRenderer ( attrs : Obj , scope : IScope ) {
187+ function getRenderer ( ) {
187188 return {
188189 enter : function ( element : JQuery , target : any , cb : Function ) {
189190 if ( angular . version . minor > 2 ) {
@@ -221,15 +222,11 @@ uiView = [
221222 return function ( scope : IScope , $element : IAugmentedJQuery , attrs : Obj ) {
222223 const onloadExp = attrs [ 'onload' ] || '' ,
223224 autoScrollExp = attrs [ 'autoscroll' ] ,
224- renderer = getRenderer ( attrs , scope ) ,
225+ renderer = getRenderer ( ) ,
225226 inherited = $element . inheritedData ( '$uiView' ) || rootData ,
226227 name = $interpolate ( attrs [ 'uiView' ] || attrs [ 'name' ] || '' ) ( scope ) || '$default' ;
227228
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 ;
233230
234231 const activeUIView : ActiveUIView = {
235232 $type : 'ng1' ,
@@ -263,7 +260,7 @@ uiView = [
263260
264261 updateView ( ) ;
265262
266- unregister = $view . registerUIView ( activeUIView ) ;
263+ const unregister = $view . registerUIView ( activeUIView ) ;
267264 scope . $on ( '$destroy' , function ( ) {
268265 trace . traceUIViewEvent ( 'Destroying/Unregistering' , activeUIView ) ;
269266 unregister ( ) ;
@@ -363,16 +360,15 @@ uiView = [
363360 } ,
364361] ;
365362
366- $ViewDirectiveFill . $inject = [ '$compile' , '$controller' , '$transitions' , '$view' , '$q' , '$timeout' ] ;
363+ $ViewDirectiveFill . $inject = [ '$compile' , '$controller' , '$transitions' , '$view' , '$q' ] ;
367364
368365/** @hidden */
369366function $ViewDirectiveFill (
370367 $compile : angular . ICompileService ,
371368 $controller : angular . IControllerService ,
372369 $transitions : TransitionService ,
373370 $view : ViewService ,
374- $q : angular . IQService ,
375- $timeout : ITimeoutService
371+ $q : angular . IQService
376372) {
377373 const getControllerAs = parse ( 'viewDecl.controllerAs' ) ;
378374 const getResolveAs = parse ( 'viewDecl.resolveAs' ) ;
0 commit comments