@@ -931,7 +931,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
931
931
: null ;
932
932
933
933
if ( nodeLinkFn && nodeLinkFn . scope ) {
934
- safeAddClass ( jqLite ( nodeList [ i ] ) , 'ng-scope' ) ;
934
+ safeAddClass ( attrs . $$element , 'ng-scope' ) ;
935
935
}
936
936
937
937
childLinkFn = ( nodeLinkFn && nodeLinkFn . terminal ||
@@ -953,7 +953,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
953
953
return linkFnFound ? compositeLinkFn : null ;
954
954
955
955
function compositeLinkFn ( scope , nodeList , $rootElement , parentBoundTranscludeFn ) {
956
- var nodeLinkFn , childLinkFn , node , $node , childScope , i , ii , n , childBoundTranscludeFn ;
956
+ var nodeLinkFn , childLinkFn , node , childScope , i , ii , n , childBoundTranscludeFn ;
957
957
958
958
// copy nodeList so that linking doesn't break due to live list updates.
959
959
var nodeListLength = nodeList . length ,
@@ -966,12 +966,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
966
966
node = stableNodeList [ n ] ;
967
967
nodeLinkFn = linkFns [ i ++ ] ;
968
968
childLinkFn = linkFns [ i ++ ] ;
969
- $node = jqLite ( node ) ;
970
969
971
970
if ( nodeLinkFn ) {
972
971
if ( nodeLinkFn . scope ) {
973
972
childScope = scope . $new ( ) ;
974
- $ node. data ( '$scope' , childScope ) ;
973
+ jqLite ( node ) . data ( '$scope' , childScope ) ;
975
974
} else {
976
975
childScope = scope ;
977
976
}
@@ -1273,12 +1272,12 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
1273
1272
if ( directiveValue == 'element' ) {
1274
1273
hasElementTranscludeDirective = true ;
1275
1274
terminalPriority = directive . priority ;
1276
- $template = groupScan ( compileNode , attrStart , attrEnd ) ;
1275
+ $template = $ compileNode;
1277
1276
$compileNode = templateAttrs . $$element =
1278
1277
jqLite ( document . createComment ( ' ' + directiveName + ': ' +
1279
1278
templateAttrs [ directiveName ] + ' ' ) ) ;
1280
1279
compileNode = $compileNode [ 0 ] ;
1281
- replaceWith ( jqCollection , jqLite ( sliceArgs ( $template ) ) , compileNode ) ;
1280
+ replaceWith ( jqCollection , sliceArgs ( $template ) , compileNode ) ;
1282
1281
1283
1282
childTranscludeFn = compile ( $template , transcludeFn , terminalPriority ,
1284
1283
replaceDirective && replaceDirective . name , {
@@ -1462,20 +1461,19 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
1462
1461
1463
1462
if ( newIsolateScopeDirective ) {
1464
1463
var LOCAL_REGEXP = / ^ \s * ( [ @ = & ] ) ( \? ? ) \s * ( \w * ) \s * $ / ;
1465
- var $linkNode = jqLite ( linkNode ) ;
1466
1464
1467
1465
isolateScope = scope . $new ( true ) ;
1468
1466
1469
1467
if ( templateDirective && ( templateDirective === newIsolateScopeDirective ||
1470
1468
templateDirective === newIsolateScopeDirective . $$originalDirective ) ) {
1471
- $linkNode . data ( '$isolateScope' , isolateScope ) ;
1469
+ $element . data ( '$isolateScope' , isolateScope ) ;
1472
1470
} else {
1473
- $linkNode . data ( '$isolateScopeNoTemplate' , isolateScope ) ;
1471
+ $element . data ( '$isolateScopeNoTemplate' , isolateScope ) ;
1474
1472
}
1475
1473
1476
1474
1477
1475
1478
- safeAddClass ( $linkNode , 'ng-isolate-scope' ) ;
1476
+ safeAddClass ( $element , 'ng-isolate-scope' ) ;
1479
1477
1480
1478
forEach ( newIsolateScopeDirective . scope , function ( definition , scopeName ) {
1481
1479
var match = definition . match ( LOCAL_REGEXP ) || [ ] ,
0 commit comments