Skip to content

Commit c52d095

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

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

23342334
var controllerInstance = $controller(controller, locals, true, directive.controllerAs);
23352335

2336-
// For directives with element transclusion the element is a comment,
2337-
// but jQuery .data doesn't support attaching data to comment nodes as it's hard to
2338-
// clean up (http://bugs.jquery.com/ticket/8335).
2336+
// For directives with element transclusion the element is a comment.
2337+
// In this case .data will not attach any data.
23392338
// Instead, we save the controllers for the element in a local hash and attach to .data
23402339
// later, once we have the actual element.
23412340
elementControllers[directive.name] = controllerInstance;
2342-
if (!hasElementTranscludeDirective) {
2343-
$element.data('$' + directive.name + 'Controller', controllerInstance.instance);
2344-
}
2341+
$element.data('$' + directive.name + 'Controller', controllerInstance.instance);
23452342
}
23462343
return elementControllers;
23472344
}

0 commit comments

Comments
 (0)