Skip to content

Commit 4879e49

Browse files
jbedardNarretz
authored andcommitted
refactor($compile): remove out of date jQuery vs jqLite comment/workaround
1 parent aec25f1 commit 4879e49

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/ng/compile.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,15 +1995,12 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
19951995

19961996
var controllerInstance = $controller(controller, locals, true, directive.controllerAs);
19971997

1998-
// For directives with element transclusion the element is a comment,
1999-
// but jQuery .data doesn't support attaching data to comment nodes as it's hard to
2000-
// clean up (http://bugs.jquery.com/ticket/8335).
1998+
// For directives with element transclusion the element is a comment.
1999+
// In this case .data will not attach any data.
20012000
// Instead, we save the controllers for the element in a local hash and attach to .data
20022001
// later, once we have the actual element.
20032002
elementControllers[directive.name] = controllerInstance;
2004-
if (!hasElementTranscludeDirective) {
2005-
$element.data('$' + directive.name + 'Controller', controllerInstance.instance);
2006-
}
2003+
$element.data('$' + directive.name + 'Controller', controllerInstance.instance);
20072004
}
20082005
return elementControllers;
20092006
}

0 commit comments

Comments
 (0)