aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngRoute/directive
diff options
context:
space:
mode:
Diffstat (limited to 'src/ngRoute/directive')
-rw-r--r--src/ngRoute/directive/ngView.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ngRoute/directive/ngView.js b/src/ngRoute/directive/ngView.js
index 448e375c..a25563ae 100644
--- a/src/ngRoute/directive/ngView.js
+++ b/src/ngRoute/directive/ngView.js
@@ -40,7 +40,7 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
deps="angular-route.js;angular-animate.js"
animations="true" fixBase="true">
<file name="index.html">
- <div ng-controller="MainCntl as main">
+ <div ng-controller="MainCtrl as main">
Choose:
<a href="Book/Moby">Moby</a> |
<a href="Book/Moby/ch/1">Moby: Ch1</a> |
@@ -123,12 +123,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'
});
@@ -136,19 +136,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;
}
</file>
@@ -157,14 +157,14 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
it('should load and compile correct template', function() {
element(by.linkText('Moby: Ch1')).click();
var content = element(by.css('[ng-view]')).getText();
- expect(content).toMatch(/controller\: ChapterCntl/);
+ expect(content).toMatch(/controller\: ChapterCtrl/);
expect(content).toMatch(/Book Id\: Moby/);
expect(content).toMatch(/Chapter Id\: 1/);
element(by.partialLinkText('Scarlet')).click();
content = element(by.css('[ng-view]')).getText();
- expect(content).toMatch(/controller\: BookCntl/);
+ expect(content).toMatch(/controller\: BookCtrl/);
expect(content).toMatch(/Book Id\: Scarlet/);
});
</file>