This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -2128,15 +2128,12 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
2128
2128
2129
2129
var controllerInstance = $controller ( controller , locals , true , directive . controllerAs ) ;
2130
2130
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.
2134
2133
// Instead, we save the controllers for the element in a local hash and attach to .data
2135
2134
// later, once we have the actual element.
2136
2135
elementControllers [ directive . name ] = controllerInstance ;
2137
- if ( ! hasElementTranscludeDirective ) {
2138
- $element . data ( '$' + directive . name + 'Controller' , controllerInstance . instance ) ;
2139
- }
2136
+ $element . data ( '$' + directive . name + 'Controller' , controllerInstance . instance ) ;
2140
2137
}
2141
2138
return elementControllers ;
2142
2139
}
You can’t perform that action at this time.
0 commit comments