22 * @ng 1api
33 * @module directives
44 */ /** for typedoc */
5- import { ng as angular } from " ../angular" ;
6- import { IInterpolateService , IScope , ITranscludeFunction , IAugmentedJQuery , ITimeoutService } from " angular" ;
5+ import { ng as angular } from ' ../angular' ;
6+ import { IInterpolateService , IScope , ITranscludeFunction , IAugmentedJQuery , ITimeoutService } from ' angular' ;
77
88import {
99 extend , unnestR , filter , tail , isDefined , isFunction , isString , trace , parse ,
1010 ActiveUIView , TransitionService , ResolveContext , Transition , PathNode , StateDeclaration ,
1111 Param , kebobString , HookRegOptions , ViewService , $QLike , Obj , TypedMap , noop ,
12- } from " @uirouter/core" ;
13- import { Ng1ViewConfig } from " ../statebuilders/views" ;
14- import { Ng1Controller , Ng1StateDeclaration } from " ../interface" ;
15- import { getLocals } from " ../services" ;
16- import { ng1_directive } from " ./stateDirectives" ;
12+ } from ' @uirouter/core' ;
13+ import { Ng1ViewConfig } from ' ../statebuilders/views' ;
14+ import { Ng1Controller , Ng1StateDeclaration } from ' ../interface' ;
15+ import { getLocals } from ' ../services' ;
16+ import { ng1_directive } from ' ./stateDirectives' ;
1717
1818/** @hidden */
1919export type UIViewData = {
@@ -210,7 +210,7 @@ function $ViewDirective($view: ViewService, $animate: any, $uiViewScroll: any, $
210210 $type : 'ng1' ,
211211 id : directive . count ++ , // Global sequential ID for ui-view tags added to DOM
212212 name : name , // ui-view name (<div ui-view="name"></div>
213- fqn : inherited . $uiView . fqn ? inherited . $uiView . fqn + "." + name : name , // fully qualified name, describes location in DOM
213+ fqn : inherited . $uiView . fqn ? inherited . $uiView . fqn + '.' + name : name , // fully qualified name, describes location in DOM
214214 config : null , // The ViewConfig loaded (from a state.views definition)
215215 configUpdated : configUpdatedCallback , // Called when the matching ViewConfig changes
216216 get creationContext ( ) { // The context in which this ui-view "tag" was created
@@ -222,7 +222,7 @@ function $ViewDirective($view: ViewService, $animate: any, $uiViewScroll: any, $
222222 }
223223 } ;
224224
225- trace . traceUIViewEvent ( " Linking" , activeUIView ) ;
225+ trace . traceUIViewEvent ( ' Linking' , activeUIView ) ;
226226
227227 function configUpdatedCallback ( config ?: Ng1ViewConfig ) {
228228 if ( config && ! ( config instanceof Ng1ViewConfig ) ) return ;
@@ -238,27 +238,27 @@ function $ViewDirective($view: ViewService, $animate: any, $uiViewScroll: any, $
238238 updateView ( ) ;
239239
240240 unregister = $view . registerUIView ( activeUIView ) ;
241- scope . $on ( " $destroy" , function ( ) {
242- trace . traceUIViewEvent ( " Destroying/Unregistering" , activeUIView ) ;
241+ scope . $on ( ' $destroy' , function ( ) {
242+ trace . traceUIViewEvent ( ' Destroying/Unregistering' , activeUIView ) ;
243243 unregister ( ) ;
244244 } ) ;
245245
246246 function cleanupLastView ( ) {
247247 if ( previousEl ) {
248- trace . traceUIViewEvent ( " Removing (previous) el" , previousEl . data ( '$uiView' ) ) ;
248+ trace . traceUIViewEvent ( ' Removing (previous) el' , previousEl . data ( '$uiView' ) ) ;
249249 previousEl . remove ( ) ;
250250 previousEl = null ;
251251 }
252252
253253 if ( currentScope ) {
254- trace . traceUIViewEvent ( " Destroying scope" , activeUIView ) ;
254+ trace . traceUIViewEvent ( ' Destroying scope' , activeUIView ) ;
255255 currentScope . $destroy ( ) ;
256256 currentScope = null ;
257257 }
258258
259259 if ( currentEl ) {
260260 const _viewData = currentEl . data ( '$uiViewAnim' ) ;
261- trace . traceUIViewEvent ( " Animate out" , _viewData ) ;
261+ trace . traceUIViewEvent ( ' Animate out' , _viewData ) ;
262262 renderer . leave ( currentEl , function ( ) {
263263 _viewData . $$animLeave . resolve ( ) ;
264264 previousEl = null ;
@@ -396,7 +396,7 @@ function $ViewDirectiveFill($compile: angular.ICompileService,
396396 if ( isString ( cfg . viewDecl . component ) ) {
397397 const cmp = cfg . viewDecl . component ;
398398 const kebobName = kebobString ( cmp ) ;
399- const tagRegexp = new RegExp ( `^(x-|data-)?${ kebobName } $` , "i" ) ;
399+ const tagRegexp = new RegExp ( `^(x-|data-)?${ kebobName } $` , 'i' ) ;
400400
401401 const getComponentController = ( ) => {
402402 const directiveEl = [ ] . slice . call ( $element [ 0 ] . children )
@@ -448,8 +448,8 @@ function registerControllerCallbacks($q: angular.IQService,
448448 // Exit early if the $transition$ will exit the state the view is for.
449449 if ( $transition$ === viewCreationTrans || $transition$ . exiting ( ) . indexOf ( viewState as StateDeclaration ) !== - 1 ) return ;
450450
451- const toParams = $transition$ . params ( "to" ) as TypedMap < any > ;
452- const fromParams = $transition$ . params < TypedMap < any > > ( " from" ) as TypedMap < any > ;
451+ const toParams = $transition$ . params ( 'to' ) as TypedMap < any > ;
452+ const fromParams = $transition$ . params < TypedMap < any > > ( ' from' ) as TypedMap < any > ;
453453 const toSchema : Param [ ] = $transition$ . treeChanges ( ) . to . map ( ( node : PathNode ) => node . paramSchema ) . reduce ( unnestR , [ ] ) ;
454454 const fromSchema : Param [ ] = $transition$ . treeChanges ( ) . from . map ( ( node : PathNode ) => node . paramSchema ) . reduce ( unnestR , [ ] ) ;
455455
0 commit comments