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 @@ -1995,15 +1995,12 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
1995
1995
1996
1996
var controllerInstance = $controller ( controller , locals , true , directive . controllerAs ) ;
1997
1997
1998
- // For directives with element transclusion the element is a comment,
1999
- // but jQuery .data doesn't support attaching data to comment nodes as it's hard to
2000
- // clean up (http://bugs.jquery.com/ticket/8335).
1998
+ // For directives with element transclusion the element is a comment.
1999
+ // In this case .data will not attach any data.
2001
2000
// Instead, we save the controllers for the element in a local hash and attach to .data
2002
2001
// later, once we have the actual element.
2003
2002
elementControllers [ directive . name ] = controllerInstance ;
2004
- if ( ! hasElementTranscludeDirective ) {
2005
- $element . data ( '$' + directive . name + 'Controller' , controllerInstance . instance ) ;
2006
- }
2003
+ $element . data ( '$' + directive . name + 'Controller' , controllerInstance . instance ) ;
2007
2004
}
2008
2005
return elementControllers ;
2009
2006
}
You can’t perform that action at this time.
0 commit comments