@@ -908,7 +908,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
908
908
: null ;
909
909
910
910
if ( nodeLinkFn && nodeLinkFn . scope ) {
911
- safeAddClass ( jqLite ( nodeList [ i ] ) , 'ng-scope' ) ;
911
+ safeAddClass ( attrs . $$element , 'ng-scope' ) ;
912
912
}
913
913
914
914
childLinkFn = ( nodeLinkFn && nodeLinkFn . terminal ||
@@ -930,7 +930,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
930
930
return linkFnFound ? compositeLinkFn : null ;
931
931
932
932
function compositeLinkFn ( scope , nodeList , $rootElement , parentBoundTranscludeFn ) {
933
- var nodeLinkFn , childLinkFn , node , $node , childScope , i , ii , n , childBoundTranscludeFn ;
933
+ var nodeLinkFn , childLinkFn , node , childScope , i , ii , n , childBoundTranscludeFn ;
934
934
935
935
// copy nodeList so that linking doesn't break due to live list updates.
936
936
var nodeListLength = nodeList . length ,
@@ -943,12 +943,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
943
943
node = stableNodeList [ n ] ;
944
944
nodeLinkFn = linkFns [ i ++ ] ;
945
945
childLinkFn = linkFns [ i ++ ] ;
946
- $node = jqLite ( node ) ;
947
946
948
947
if ( nodeLinkFn ) {
949
948
if ( nodeLinkFn . scope ) {
950
949
childScope = scope . $new ( ) ;
951
- $ node. data ( '$scope' , childScope ) ;
950
+ jqLite ( node ) . data ( '$scope' , childScope ) ;
952
951
} else {
953
952
childScope = scope ;
954
953
}
@@ -1240,12 +1239,12 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
1240
1239
if ( directiveValue == 'element' ) {
1241
1240
hasElementTranscludeDirective = true ;
1242
1241
terminalPriority = directive . priority ;
1243
- $template = groupScan ( compileNode , attrStart , attrEnd ) ;
1242
+ $template = $ compileNode;
1244
1243
$compileNode = templateAttrs . $$element =
1245
1244
jqLite ( document . createComment ( ' ' + directiveName + ': ' +
1246
1245
templateAttrs [ directiveName ] + ' ' ) ) ;
1247
1246
compileNode = $compileNode [ 0 ] ;
1248
- replaceWith ( jqCollection , jqLite ( sliceArgs ( $template ) ) , compileNode ) ;
1247
+ replaceWith ( jqCollection , sliceArgs ( $template ) , compileNode ) ;
1249
1248
1250
1249
childTranscludeFn = compile ( $template , transcludeFn , terminalPriority ,
1251
1250
replaceDirective && replaceDirective . name , {
@@ -1429,20 +1428,19 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
1429
1428
1430
1429
if ( newIsolateScopeDirective ) {
1431
1430
var LOCAL_REGEXP = / ^ \s * ( [ @ = & ] ) ( \? ? ) \s * ( \w * ) \s * $ / ;
1432
- var $linkNode = jqLite ( linkNode ) ;
1433
1431
1434
1432
isolateScope = scope . $new ( true ) ;
1435
1433
1436
1434
if ( templateDirective && ( templateDirective === newIsolateScopeDirective ||
1437
1435
templateDirective === newIsolateScopeDirective . $$originalDirective ) ) {
1438
- $linkNode . data ( '$isolateScope' , isolateScope ) ;
1436
+ $element . data ( '$isolateScope' , isolateScope ) ;
1439
1437
} else {
1440
- $linkNode . data ( '$isolateScopeNoTemplate' , isolateScope ) ;
1438
+ $element . data ( '$isolateScopeNoTemplate' , isolateScope ) ;
1441
1439
}
1442
1440
1443
1441
1444
1442
1445
- safeAddClass ( $linkNode , 'ng-isolate-scope' ) ;
1443
+ safeAddClass ( $element , 'ng-isolate-scope' ) ;
1446
1444
1447
1445
forEach ( newIsolateScopeDirective . scope , function ( definition , scopeName ) {
1448
1446
var match = definition . match ( LOCAL_REGEXP ) || [ ] ,
0 commit comments