aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/directive/ngView.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/directive/ngView.js b/src/directive/ngView.js
index d5b24bcb..95b1546d 100644
--- a/src/directive/ngView.js
+++ b/src/directive/ngView.js
@@ -149,7 +149,8 @@ var ngViewDirective = ['$http', '$templateCache', '$route', '$anchorScroll', '$c
lastScope = current.scope = scope.$new();
if (current.controller) {
- $controller(current.controller, {$scope: lastScope});
+ element.contents().
+ data('$ngControllerController', $controller(current.controller, {$scope: lastScope}));
}
link(lastScope);