diff options
| author | Misko Hevery | 2012-03-15 13:41:06 -0700 |
|---|---|---|
| committer | Misko Hevery | 2012-03-19 11:35:09 -0700 |
| commit | 21e74c2d2e8e985b23711785287feb59965cbd90 (patch) | |
| tree | f795363c0183df399c655b42ffd81b806e4e6c06 /src/directive/ngView.js | |
| parent | 6c5a05ad49a1e083570c3dfe331403398f899dbe (diff) | |
| download | angular.js-21e74c2d2e8e985b23711785287feb59965cbd90.tar.bz2 | |
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.
Diffstat (limited to 'src/directive/ngView.js')
| -rw-r--r-- | src/directive/ngView.js | 3 |
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); |
