Skip to content

Commit 4c03164

Browse files
committed
fix(viewDirective): fix injection for controller
1 parent 7174ee5 commit 4c03164

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng1/viewDirective.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ function $ViewDirectiveFill ( $compile, $controller, $interpolate, $injec
289289

290290
if (controller) {
291291
let locals = data.$locals;
292-
let controllerInstance = $controller(controller, extend(locals, { $scope: scope }));
292+
let controllerInstance = $controller(controller, extend(locals, { $scope: scope, $element: $element }));
293293
if (controllerAs) scope[controllerAs] = controllerInstance;
294294
$element.data('$ngControllerController', controllerInstance);
295295
$element.children().data('$ngControllerController', controllerInstance);

0 commit comments

Comments
 (0)