diff --git a/src/ngRoute/directive/ngView.js b/src/ngRoute/directive/ngView.js index 41ed9f312391..9995e8cfd690 100644 --- a/src/ngRoute/directive/ngView.js +++ b/src/ngRoute/directive/ngView.js @@ -38,7 +38,7 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory); * @example -
+
Choose: Moby | Moby: Ch1 | @@ -121,12 +121,12 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory); function($routeProvider, $locationProvider) { $routeProvider.when('/Book/:bookId', { templateUrl: 'book.html', - controller: BookCntl, + controller: BookCtrl, controllerAs: 'book' }); $routeProvider.when('/Book/:bookId/ch/:chapterId', { templateUrl: 'chapter.html', - controller: ChapterCntl, + controller: ChapterCtrl, controllerAs: 'chapter' }); @@ -134,19 +134,19 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory); $locationProvider.html5Mode(true); }); - function MainCntl($route, $routeParams, $location) { + function MainCtrl($route, $routeParams, $location) { this.$route = $route; this.$location = $location; this.$routeParams = $routeParams; } - function BookCntl($routeParams) { - this.name = "BookCntl"; + function BookCtrl($routeParams) { + this.name = "BookCtrl"; this.params = $routeParams; } - function ChapterCntl($routeParams) { - this.name = "ChapterCntl"; + function ChapterCtrl($routeParams) { + this.name = "ChapterCtrl"; this.params = $routeParams; } @@ -155,13 +155,13 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory); it('should load and compile correct template', function() { element('a:contains("Moby: Ch1")').click(); var content = element('.doc-example-live [ng-view]').text(); - expect(content).toMatch(/controller\: ChapterCntl/); + expect(content).toMatch(/controller\: ChapterCtrl/); expect(content).toMatch(/Book Id\: Moby/); expect(content).toMatch(/Chapter Id\: 1/); element('a:contains("Scarlet")').click(); content = element('.doc-example-live [ng-view]').text(); - expect(content).toMatch(/controller\: BookCntl/); + expect(content).toMatch(/controller\: BookCtrl/); expect(content).toMatch(/Book Id\: Scarlet/); });