@@ -42,8 +42,8 @@ template/view. This behavior interacts with and modifies the application model.
4242As discussed in the {@link dev_guide.mvc.understanding_model Model} section of this guide, any
4343objects (or primitives) assigned to the scope become model properties. Any functions assigned to
4444the scope, along with any prototype methods of the controller type, become functions available in
45- the template/view, and can be invoked via angular expressions and `ng: ` event handlers (e.g. {@link
46- api/angular.module.ng.$compileProvider.directive.ng: click ng: click}). These controller methods are always evaluated within the
45+ the template/view, and can be invoked via angular expressions and `ng- ` event handlers (e.g. {@link
46+ api/angular.module.ng.$compileProvider.directive.ng- click ng- click}). These controller methods are always evaluated within the
4747context of the angular scope object that the controller function was applied to (which means that
4848the `this` keyword of any controller method is always bound to the scope that the controller
4949augments). This is how the second task of adding behavior to the scope is accomplished.
@@ -65,8 +65,8 @@ Do not use controllers for:
6565manipulation—the presentation logic of an application—is well known for being hard to test.
6666Putting any presentation logic into controllers significantly affects testability of the business
6767logic. Angular offers {@link dev_guide.templates.databinding} for automatic DOM manipulation. If
68- you have to perform your own manual DOM manipulation, encapsulate the presentation logic in {@link
69- dev_guide.compiler.widgets widgets} and {@link dev_guide.compiler.directives directives}.
68+ you have to perform your own manual DOM manipulation, encapsulate the presentation logic in and
69+ {@link api/angular.module.ng.$compileProvider.directive directives}.
7070- Input formatting — Use {@link dev_guide.forms angular form widgets} instead.
7171- Output filtering — Use {@link dev_guide.templates.filters angular filters} instead.
7272- Run stateless or stateful code shared across controllers — Use {@link dev_guide.services angular
@@ -78,7 +78,7 @@ instances).
7878# Associating Controllers with Angular Scope Objects
7979
8080You can associate controllers with scope objects explicitly via the {@link api/angular.module.ng.$rootScope.Scope#$new
81- scope.$new} api or implicitly via the {@link api/angular.module.ng.$compileProvider.directive.ng: controller ng: controller
81+ scope.$new} api or implicitly via the {@link api/angular.module.ng.$compileProvider.directive.ng- controller ng- controller
8282directive} or {@link api/angular.module.ng.$route $route service}.
8383
8484
@@ -99,9 +99,9 @@ string "very". Depending on which button is clicked, the `spice` model is set to
9999## A Spicy Controller Example
100100
101101<pre>
102- <body ng: controller="SpicyCtrl">
103- <button ng: click="chiliSpicy()">Chili</button>
104- <button ng: click="jalapenoSpicy()">Jalapeño</button>
102+ <body ng- controller="SpicyCtrl">
103+ <button ng- click="chiliSpicy()">Chili</button>
104+ <button ng- click="jalapenoSpicy()">Jalapeño</button>
105105 <p>The food is {{spice}} spicy!</p>
106106</body>
107107
@@ -119,7 +119,7 @@ SpicyCtrl.prototype.jalapenoSpicy = function() {
119119
120120Things to notice in the example above:
121121
122- - The `ng: controller` directive is used to (implicitly) create a scope for our template, and the
122+ - The `ng- controller` directive is used to (implicitly) create a scope for our template, and the
123123scope is augmented (managed) by the `SpicyCtrl` controller.
124124- `SpicyCtrl` is just a plain JavaScript function. As an (optional) naming convention the name
125125starts with capital letter and ends with "Ctrl" or "Controller".
@@ -137,10 +137,10 @@ previous example.
137137## Controller Method Arguments Example
138138
139139<pre>
140- <body ng: controller="SpicyCtrl">
141- <input ng: model="customSpice" value="wasabi">
142- <button ng: click="spicy('chili')">Chili</button>
143- <button ng: click="spicy(customSpice)">Custom spice</button>
140+ <body ng- controller="SpicyCtrl">
141+ <input ng- model="customSpice" value="wasabi">
142+ <button ng- click="spicy('chili')">Chili</button>
143+ <button ng- click="spicy(customSpice)">Custom spice</button>
144144 <p>The food is {{spice}} spicy!</p>
145145</body>
146146
@@ -164,11 +164,11 @@ Controller inheritance in angular is based on {@link api/angular.module.ng.$root
164164have a look at an example:
165165
166166<pre>
167- <body ng: controller="MainCtrl">
167+ <body ng- controller="MainCtrl">
168168 <p>Good {{timeOfDay}}, {{name}}!</p>
169- <div ng: controller="ChildCtrl">
169+ <div ng- controller="ChildCtrl">
170170 <p>Good {{timeOfDay}}, {{name}}!</p>
171- <p ng: controller="BabyCtrl">Good {{timeOfDay}}, {{name}}!</p>
171+ <p ng- controller="BabyCtrl">Good {{timeOfDay}}, {{name}}!</p>
172172</body>
173173
174174function MainCtrl($scope) {
@@ -186,7 +186,7 @@ function BabyCtrl($scope) {
186186}
187187</pre>
188188
189- Notice how we nested three `ng: controller` directives in our template. This template construct will
189+ Notice how we nested three `ng- controller` directives in our template. This template construct will
190190result in 4 scopes being created for our view:
191191
192192- The root scope
0 commit comments