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

Commit f5efd1e

Browse files
committed
refactor($compile): remove out of date jQuery vs jqLite comment/workaround
1 parent 234053f commit f5efd1e

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
@@ -2423,15 +2423,12 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
24232423

24242424
var controllerInstance = $controller(controller, locals, true, directive.controllerAs);
24252425

2426-
// For directives with element transclusion the element is a comment,
2427-
// but jQuery .data doesn't support attaching data to comment nodes as it's hard to
2428-
// clean up (http://bugs.jquery.com/ticket/8335).
2426+
// For directives with element transclusion the element is a comment.
2427+
// In this case .data will not attach any data.
24292428
// Instead, we save the controllers for the element in a local hash and attach to .data
24302429
// later, once we have the actual element.
24312430
elementControllers[directive.name] = controllerInstance;
2432-
if (!hasElementTranscludeDirective) {
2433-
$element.data('$' + directive.name + 'Controller', controllerInstance.instance);
2434-
}
2431+
$element.data('$' + directive.name + 'Controller', controllerInstance.instance);
24352432
}
24362433
return elementControllers;
24372434
}

0 commit comments

Comments
 (0)