fix(ngView): controller not published

corrected omitted assignment of controller to the element data object. Without this fix the controller created by ngView is not accessible from the browser debugger.
This commit is contained in:
Misko Hevery
2012-03-15 13:41:06 -07:00
parent 6c5a05ad49
commit 21e74c2d2e
2 changed files with 31 additions and 1 deletions

View File

@@ -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);