Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit d069020

Browse files
committed
refactor(\): remove out of date jQuery vs jqLite comment/workaround
1 parent 798fb18 commit d069020

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/ng/compile.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -2128,15 +2128,12 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
21282128

21292129
var controllerInstance = $controller(controller, locals, true, directive.controllerAs);
21302130

2131-
// For directives with element transclusion the element is a comment,
2132-
// but jQuery .data doesn't support attaching data to comment nodes as it's hard to
2133-
// clean up (http://bugs.jquery.com/ticket/8335).
2131+
// For directives with element transclusion the element is a comment.
2132+
// In this case jQuery .data will not attach any data.
21342133
// Instead, we save the controllers for the element in a local hash and attach to .data
21352134
// later, once we have the actual element.
21362135
elementControllers[directive.name] = controllerInstance;
2137-
if (!hasElementTranscludeDirective) {
2138-
$element.data('$' + directive.name + 'Controller', controllerInstance.instance);
2139-
}
2136+
$element.data('$' + directive.name + 'Controller', controllerInstance.instance);
21402137
}
21412138
return elementControllers;
21422139
}

0 commit comments

Comments
 (0)