Skip to content

Commit 82d90a4

Browse files
committed
fix(docs): change all directive references to use the normalized names
1 parent 7468bcb commit 82d90a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+349
-332
lines changed

CHANGELOG.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ docs. The biggest improvements and changes are listed below.
238238
So instead of `{{ someRawHtml | html }}` use `<div ng-bind-html="someRawHtml"></div>` and
239239
instead of `{{ someRawHtml | html:"unsafe" }}` use `<div ng-bind-html-unsafe="someRawHtml"></div>`.
240240
Please check out the
241-
[ng-bind-html](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-bind-html)
241+
[ng-bind-html](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngBindHtml)
242242
and
243-
[ng-bind-html-unsafe](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-bind-html-unsafe)
243+
[ng-bind-html-unsafe](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngBindHtmlUnsafe)
244244
directive docs.
245245

246246
- Custom markup has been used by developers only to switch from `{{ }}` markup to `(( ))` or
@@ -389,13 +389,13 @@ behavior and migrate your controllers one at a time: <https://gist.github.com/16
389389

390390
## New directives:
391391

392-
- [ng-mouseleave](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-mouseleave)
393-
- [ng-mousemove](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-mousemove)
394-
- [ng-mouseover](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-mouseover)
395-
- [ng-mouseup](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-mouseup)
396-
- [ng-mousedown](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-mousedown)
397-
- [ng-dblclick](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-dblclick)
398-
- [ng-model-instant](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-model-instant)
392+
- [ng-mouseleave](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngMouseleave)
393+
- [ng-mousemove](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngMousemove)
394+
- [ng-mouseover](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngMouseover)
395+
- [ng-mouseup](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngMouseup)
396+
- [ng-mousedown](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngMousedown)
397+
- [ng-dblclick](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngDblclick)
398+
- [ng-model-instant](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngModelInstant)
399399

400400

401401
## $injector / modules

docs/content/api/angular.module.ng.$compileProvider.directive.ngdoc

+9-9
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ a change in DOM structure such as in repeaters.
126126

127127
When the above example is compiled, the compiler visits every node and looks for directives. The
128128
`{{user}}` is an example of {@link angular.module.ng.$interpolate interpolation} directive. {@link
129-
angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} is another directive. But {@link
130-
angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} has a dilemma. It needs to be
129+
angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} is another directive. But {@link
130+
angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} has a dilemma. It needs to be
131131
able to quickly stamp out new `li`s for every `action` in `user.actions`. This means that it needs
132132
to save a clean copy of the `li` element for cloning purposes and as new `action`s are inserted,
133133
the template `li` element needs to be cloned and inserted into `ul`. But cloning the `li` element
@@ -143,12 +143,12 @@ the directives are identified and sorted by priority, and a linking phase where
143143
links a specific instance of the {@link angular.module.ng.$rootScope.Scope scope} and the specific
144144
instance of an `li` is performed.
145145

146-
{@link angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} works by preventing the
146+
{@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} works by preventing the
147147
compilation process form descending into `li` element. Instead the {@link
148-
angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} directive compiles `li`
148+
angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} directive compiles `li`
149149
seperatly. The result of of the `li` element compilation is a linking function which contains all
150150
of the directives contained in the `li` element ready to be attached to a specific clone of `li`
151-
element. At runtime the {@link angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat}
151+
element. At runtime the {@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat}
152152
watches the expression and as items are added to the array it clones the `li` element, creates a
153153
new {@link angular.module.ng.$rootScope.Scope scope} for the cloned `li` element and calls the
154154
link function on the cloned `li`.
@@ -415,8 +415,8 @@ compiler}. The attributes are:
415415
append the template to the element.
416416

417417
* `transclude` - compile the content of the element and make it available to the directive.
418-
Typically used with {@link api/angular.module.ng.$compileProvider.directive.ng-transclude
419-
ng-transclude}. The advantage of transclusion is that the linking function receives a
418+
Typically used with {@link api/angular.module.ng.$compileProvider.directive.ngTransclude
419+
ngTransclude}. The advantage of transclusion is that the linking function receives a
420420
transclusion function which is pre-bound to the correct scope. In a typical setup the widget
421421
creates an `isolate` scope, but the transclusion is not a child, but a sibling of the `isolate`
422422
scope. This makes it possible for the widget to have private state, and the transclusion to
@@ -440,8 +440,8 @@ compiler}. The attributes are:
440440
Compile function deals with transforming the template DOM. Since most directives do not do
441441
template transformation, it is not used often. Examples which require compile functions are
442442
directives which transform template DOM such as {@link
443-
angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} or load the contents
444-
asynchronously such as {@link angular.module.ng.$compileProvider.directive.ng-view ng-view}. The
443+
angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} or load the contents
444+
asynchronously such as {@link angular.module.ng.$compileProvider.directive.ngView ngView}. The
445445
compile functions takes the following arguments.
446446

447447
* `tElement` - template element - The element where the directive has been declared. It is

docs/content/cookbook/deeplinking.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ The two partials are defined in the following URLs:
106106
routes.
107107
* The {@link api/angular.module.ng.$route $route} service then watches the URL and instantiates the
108108
appropriate controller when the URL changes.
109-
* The {@link api/angular.module.ng.$compileProvider.directive.ng-view ng-view} widget loads the
109+
* The {@link api/angular.module.ng.$compileProvider.directive.ngView ngView} widget loads the
110110
view when the URL changes. It also sets the view scope to the newly instantiated controller.
111111
* Changing the URL is sufficient to change the controller and view. It makes no difference whether
112112
the URL is changed programatically or by the user.

docs/content/cookbook/form.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ allow a user to enter data.
102102

103103
# Things to notice
104104

105-
* The user data model is initialized {@link api/angular.module.ng.$compileProvider.directive.ng-controller controller} and is
105+
* The user data model is initialized {@link api/angular.module.ng.$compileProvider.directive.ngController controller} and is
106106
available in the {@link api/angular.module.ng.$rootScope.Scope scope} with the initial data.
107107
* For debugging purposes we have included a debug view of the model to better understand what
108108
is going on.

docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@name Developer Guide: Initializing Angular: Automatic Initialization
33
@description
44

5-
For Angular to manage the DOM for your application, it needs to compile some or all of an HTML page. Angular does this initialization automatically when you load the angular.js script into your page and insert an `ng-app` directive (attribute) into one of the page's elements. For example, we can tell Angular to initialize the entire document:
5+
For Angular to manage the DOM for your application, it needs to compile some or all of an HTML page. Angular does this initialization automatically when you load the angular.js script into your page and insert an `ngApp` directive (attribute) into one of the page's elements. For example, we can tell Angular to initialize the entire document:
66

77
<pre>
88
<!doctype html>
@@ -16,15 +16,15 @@ For Angular to manage the DOM for your application, it needs to compile some or
1616
</html>
1717
</pre>
1818

19-
You can also tell Angular to manage only a portion of a page. You would want to do this if you are using some other framework to manage other parts of the page. You do this by placing the `ng-app` directive on one or more container elements in the document. For example:
19+
You can also tell Angular to manage only a portion of a page. You would want to do this if you are using some other framework to manage other parts of the page. You do this by placing the `ngApp` directive on one or more container elements in the document. For example:
2020

2121
<pre>
2222
<div ng-app>
2323
I can add: {{ 1+2 }}
2424
</div>
2525
</pre>
2626

27-
You can also ask `ng-app` to load additional {@link api/angular.module modules} containing services, directives or filers that you'll use on the page.
27+
You can also ask `ngApp` to load additional {@link api/angular.module modules} containing services, directives or filers that you'll use on the page.
2828

2929
<pre>
3030
<div ng-app="AwesomeModule">
@@ -38,7 +38,7 @@ From a high-level, here's what Angular does during the initialization process:
3838
1. The browser loads the page, and then runs the Angular script. Angular then waits for the
3939
`DOMContentLoaded` (or 'Load') event to attempt to initialize.
4040

41-
2. Angular looks for the `ng-app` directive. If found it compilies the DOM element containing `ng-app` and its children.
41+
2. Angular looks for the `ngApp` directive. If found it compilies the DOM element containing `ngApp` and its children.
4242

4343
3. Angular creates a global variable `angular` and binds all Angular APIs to this object's fields.
4444

docs/content/guide/dev_guide.bootstrap.manual_bootstrap.ngdoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
@name Developer Guide: Initializing Angular: Manual Initialization
33
@description
44

5-
In the vast majority of cases you'll want to let Angular handle initialization automatically.
6-
If, however, you need to delay Angular from managing the page right after the DOMContentLoaded
5+
In the vast majority of cases you'll want to let Angular handle initialization automatically.
6+
If, however, you need to delay Angular from managing the page right after the DOMContentLoaded
77
event fires, you'll need to control this initialization manually.
88

9-
To initialize Angular -- after you've done your own special-purpose initialization -- just call
9+
To initialize Angular -- after you've done your own special-purpose initialization -- just call
1010
the {@link api/angular.bootstrap bootstrap()} function with the HTML container node that you want
11-
Angular to manage. In automatic initialization you'd do this by adding the `ng-app` attribute to
12-
the same node. Now, you won't use `ng-app` anywhere in your document.
11+
Angular to manage. In automatic initialization you'd do this by adding the `ngApp` attribute to
12+
the same node. Now, you won't use `ngApp` anywhere in your document.
1313

1414
To show the contrast of manual vs. automatic initialization, this automatic method:
1515

docs/content/guide/dev_guide.bootstrap.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Angular should process and manage the page. To initialize Angular you do the fol
77

88
* Specify the Angular namespace in the `<html>` page
99
* Choose which flavor of Angular script to load (debug or production)
10-
* Specify whether or not Angular should process and manage the page automatically (`ng-app`)
10+
* Specify whether or not Angular should process and manage the page automatically (`ngApp`)
1111

1212
The simplest way to initialize Angular is to load the Angular script and tell Angular to compile
1313
and manage the whole page. You do this as follows:

docs/content/guide/dev_guide.di.understanding_di.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ In the illustration above, the dependency injection sequence proceeds as follows
2727

2828
1. Module "phonecat" is created and all the service providers are registered with this module.
2929
(the "ng" module is created by Angular behind the scenes as well)
30-
2. `ng-app` triggers bootstrap sequence on given element, during which angular creates injector,
30+
2. `ngApp` triggers bootstrap sequence on given element, during which angular creates injector,
3131
loads "phonecat" and "ng" modules and compiles the template.
32-
3. The `ng-controller` directive implicitly creates a new child scope and instantiates
32+
3. The `ngController` directive implicitly creates a new child scope and instantiates
3333
`PhoneListCtrl` controller.
3434
4. Injector identifies the `$http` service as `PhoneListCtrl` controller's only dependency.
3535
5. Injector checks its instances cache whether the `$http` service has already been instantiated.

docs/content/guide/dev_guide.forms.ngdoc

+12-12
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Server-side validation is still necessary for a secure application.
1212

1313

1414
# Simple form
15-
The key directive in understanding two-way data-binding is {@link api/angular.module.ng.$compileProvider.directive.ng-model ng-model}.
16-
The `ng-model` provides the two-way data-binding by synchronizing the model to the view, as well as view to the model.
17-
In addition it provides {@link api/angular.module.ng.$compileProvider.directive.ng-model.NgModelController API} for other directives to augment its behavior.
15+
The key directive in understanding two-way data-binding is {@link api/angular.module.ng.$compileProvider.directive.ngModel ngModel}.
16+
The `ngModel` directive provides the two-way data-binding by synchronizing the model to the view, as well as view to the model.
17+
In addition it provides {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController API} for other directives to augment its behavior.
1818

1919
<doc:example>
2020
<doc:source>
@@ -56,7 +56,7 @@ Note that `novalidate` is used to disable browser's native form validation.
5656

5757
# Using CSS classes
5858

59-
To allow styling of form as well as controls, `ng-model` add these CSS classes:
59+
To allow styling of form as well as controls, `ngModel` add these CSS classes:
6060

6161
- `ng-valid`
6262
- `ng-invalid`
@@ -115,7 +115,7 @@ This ensures that the user is not distracted with an error until after interacti
115115

116116
A form is in instance of {@link api/angular.module.ng.$compileProvider.directive.form.FormController FormController}.
117117
The form instance can optionally be published into the scope using the `name` attribute.
118-
Similarly control is an instance of {@link api/angular.module.ng.$compileProvider.directive.ng-model.NgModelController NgModelController}.
118+
Similarly control is an instance of {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController NgModelController}.
119119
The control instance can similarly be published into the form instance using the `name` attribute.
120120
This implies that the internal state of both the form and the control is available for binding in the view using the standard binding primitives.
121121

@@ -181,16 +181,16 @@ This allows us to extend the above example with these features:
181181
Angular provides basic implementation for most common html5 {@link api/angular.module.ng.$compileProvider.directive.input input}
182182
types: ({@link api/angular.module.ng.$compileProvider.directive.input.text text}, {@link api/angular.module.ng.$compileProvider.directive.input.number number}, {@link api/angular.module.ng.$compileProvider.directive.input.url url}, {@link api/angular.module.ng.$compileProvider.directive.input.email email}, {@link api/angular.module.ng.$compileProvider.directive.input.radio radio}, {@link api/angular.module.ng.$compileProvider.directive.input.checkbox checkbox}), as well as some directives for validation (`required`, `pattern`, `minlength`, `maxlength`, `min`, `max`).
183183

184-
Defining your own validator can be done by defining your own directive which adds a custom validation function to the `ng-model` {@link api/angular.module.ng.$compileProvider.directive.ng-model.NgModelController controller}.
184+
Defining your own validator can be done by defining your own directive which adds a custom validation function to the `ngModel` {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController controller}.
185185
To get a hold of the controller the directive specifies a dependency as shown in the example below.
186186
The validation can occur in two places:
187187

188188
* **Model to View update** -
189-
Whenever the bound model changes, all functions in {@link api/angular.module.ng.$compileProvider.directive.ng-model.NgModelController#$formatters NgModelController#$formatters} array are pipe-lined, so that each of these functions has an opportunity to format the value and change validity state of the form control through {@link api/angular.module.ng.$compileProvider.directive.ng-model.NgModelController#$setValidity NgModelController#$setValidity}.
189+
Whenever the bound model changes, all functions in {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$formatters NgModelController#$formatters} array are pipe-lined, so that each of these functions has an opportunity to format the value and change validity state of the form control through {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$setValidity NgModelController#$setValidity}.
190190

191191
* **View to Model update** -
192-
In a similar way, whenever a user interacts with a control, the controll calls {@link api/angular.module.ng.$compileProvider.directive.ng-model.NgModelController#$setViewValue NgModelController#$setViewValue}.
193-
This in turn pipelines all functions in {@link api/angular.module.ng.$compileProvider.directive.ng-model.NgModelController#$parsers NgModelController#$parsers} array, so that each of these functions has an opportunity to convert the value and change validity state of the form control through {@link api/angular.module.ng.$compileProvider.directive.ng-model.NgModelController#$setValidity NgModelController#$setValidity}.
192+
In a similar way, whenever a user interacts with a control, the controll calls {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$setViewValue NgModelController#$setViewValue}.
193+
This in turn pipelines all functions in {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$parsers NgModelController#$parsers} array, so that each of these functions has an opportunity to convert the value and change validity state of the form control through {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$setValidity NgModelController#$setValidity}.
194194

195195
In the following example we create two directives.
196196

@@ -272,13 +272,13 @@ In the following example we create two directives.
272272
</doc:example>
273273

274274

275-
# Implementing custom form control (using ng-model)
275+
# Implementing custom form control (using `ngModel`)
276276
Angular implements all of the basic HTML form controls ({@link api/angular.module.ng.$compileProvider.directive.input input}, {@link api/angular.module.ng.$compileProvider.directive.select select}, {@link api/angular.module.ng.$compileProvider.directive.textarea textarea}), which should be sufficient for most cases.
277277
However, if you need more flexibility, you can write your own form control as a directive.
278278

279-
In order for custom control to work with `ng-model` and to achieve two-way data-binding it needs to:
279+
In order for custom control to work with `ngModel` and to achieve two-way data-binding it needs to:
280280

281-
- implement `render` method, which is responsible for rendering the data after it passed the {@link api/angular.module.ng.$compileProvider.directive.ng-model.NgModelController#$formatters NgModelController#$formatters},
281+
- implement `render` method, which is responsible for rendering the data after it passed the {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$formatters NgModelController#$formatters},
282282
- call `$setViewValue` method, whenever the user interacts with the control and model needs to be updated. This is usually done inside a DOM Event listener.
283283

284284
See {@link api/angular.module.ng.$compileProvider.directive $compileProvider.directive} for more info.

0 commit comments

Comments
 (0)