diff options
Diffstat (limited to 'src/ng/directive')
| -rw-r--r-- | src/ng/directive/ngView.js | 8 |
1 files changed, 4 insertions, 4 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); } |
