mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-23 19:40:56 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user