Skip to content

Commit dd03dbd

Browse files
committed
Revert "Allow element and attr injections"
This reverts commit ac4e8a3.
1 parent 50cf872 commit dd03dbd

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/viewDirective.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,8 @@ function $ViewDirective( $state, $compile, $controller, $anchorScroll) {
4040
viewScope = scope.$new();
4141
if (locals.$$controller) {
4242
locals.$scope = viewScope;
43-
// This is a 'directive controller'. need to allow element and attr injections (TBD: transcludeFn)
44-
locals.$element = element;
45-
locals.$attrs = attr;
46-
//store directive controller with distinct name on the element.data as per angular.js convention
4743
var controller = $controller(locals.$$controller, locals);
48-
element.data('$' + name+'Controller', controller);
44+
element.contents().data('$ngControllerController', controller);
4945
}
5046
link(viewScope);
5147
viewScope.$emit('$viewContentLoaded');

0 commit comments

Comments
 (0)