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

Commit cfa415b

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

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

23472347
var controllerInstance = $controller(controller, locals, true, directive.controllerAs);
23482348

2349-
// For directives with element transclusion the element is a comment,
2350-
// but jQuery .data doesn't support attaching data to comment nodes as it's hard to
2351-
// clean up (http://bugs.jquery.com/ticket/8335).
2349+
// For directives with element transclusion the element is a comment.
2350+
// In this case .data will not attach any data.
23522351
// Instead, we save the controllers for the element in a local hash and attach to .data
23532352
// later, once we have the actual element.
23542353
elementControllers[directive.name] = controllerInstance;
2355-
if (!hasElementTranscludeDirective) {
2356-
$element.data('$' + directive.name + 'Controller', controllerInstance.instance);
2357-
}
2354+
$element.data('$' + directive.name + 'Controller', controllerInstance.instance);
23582355
}
23592356
return elementControllers;
23602357
}

0 commit comments

Comments
 (0)