diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ng/directive/ngView.js | 8 | ||||
| -rw-r--r-- | src/ng/route.js | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/ng/directive/ngView.js b/src/ng/directive/ngView.js index 8d7c87c5..d5ef2c71 100644 --- a/src/ng/directive/ngView.js +++ b/src/ng/directive/ngView.js @@ -105,12 +105,12 @@ $routeProvider.when('/Book/:bookId', { templateUrl: 'book.html', controller: BookCntl, - controllerAlias: 'book' + controllerAs: 'book' }); $routeProvider.when('/Book/:bookId/ch/:chapterId', { templateUrl: 'chapter.html', controller: ChapterCntl, - controllerAlias: 'chapter' + controllerAs: 'chapter' }); // configure html5 to get links working on jsfiddle @@ -204,8 +204,8 @@ var ngViewDirective = ['$http', '$templateCache', '$route', '$anchorScroll', '$c if (current.controller) { locals.$scope = lastScope; controller = $controller(current.controller, locals); - if (current.controllerAlias) { - lastScope[current.controllerAlias] = controller; + if (current.controllerAs) { + lastScope[current.controllerAs] = controller; } element.children().data('$ngControllerController', controller); } diff --git a/src/ng/route.js b/src/ng/route.js index 4014dfa8..12e560c7 100644 --- a/src/ng/route.js +++ b/src/ng/route.js @@ -44,8 +44,8 @@ function $RouteProvider(){ * - `controller` – `{(string|function()=}` – Controller fn that should be associated with newly * created scope or the name of a {@link angular.Module#controller registered controller} * if passed as a string. - * - `controllerAlias` – `{string=}` – A controller alias name. If present the controller will be - * published to scope under the `controllerAlias` name. + * - `controllerAs` – `{string=}` – A controller alias name. If present the controller will be + * published to scope under the `controllerAs` name. * - `template` – `{string=|function()=}` – html template as a string or function that returns * an html template as a string which should be used by {@link ng.directive:ngView ngView} or * {@link ng.directive:ngInclude ngInclude} directives. |
