diff options
| author | Igor Minar | 2012-04-06 16:35:17 -0700 | 
|---|---|---|
| committer | Igor Minar | 2012-04-09 09:52:27 -0700 | 
| commit | 82d90a409692e97a79c3bf4708ee80796c7de2d6 (patch) | |
| tree | b682f2d3042381e2456383f9c9333d30105febf8 | |
| parent | 7468bcb80b997e323bb0808d19ee215cc5f7ae84 (diff) | |
| download | angular.js-82d90a409692e97a79c3bf4708ee80796c7de2d6.tar.bz2 | |
fix(docs): change all directive references to use the normalized names
54 files changed, 349 insertions, 332 deletions
| diff --git a/CHANGELOG.md b/CHANGELOG.md index c31b63aa..04690d0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -238,9 +238,9 @@ docs. The biggest improvements and changes are listed below.      So instead of `{{ someRawHtml | html }}` use `<div ng-bind-html="someRawHtml"></div>` and      instead of `{{ someRawHtml | html:"unsafe" }}` use `<div ng-bind-html-unsafe="someRawHtml"></div>`.      Please check out the -    [ng-bind-html](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-bind-html) +    [ng-bind-html](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngBindHtml)      and -    [ng-bind-html-unsafe](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-bind-html-unsafe) +    [ng-bind-html-unsafe](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngBindHtmlUnsafe)      directive docs.    - 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  ## New directives: -- [ng-mouseleave](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-mouseleave) -- [ng-mousemove](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-mousemove) -- [ng-mouseover](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-mouseover) -- [ng-mouseup](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-mouseup) -- [ng-mousedown](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-mousedown) -- [ng-dblclick](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-dblclick) -- [ng-model-instant](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ng-model-instant) +- [ng-mouseleave](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngMouseleave) +- [ng-mousemove](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngMousemove) +- [ng-mouseover](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngMouseover) +- [ng-mouseup](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngMouseup) +- [ng-mousedown](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngMousedown) +- [ng-dblclick](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngDblclick) +- [ng-model-instant](http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive.ngModelInstant)  ## $injector / modules diff --git a/docs/content/api/angular.module.ng.$compileProvider.directive.ngdoc b/docs/content/api/angular.module.ng.$compileProvider.directive.ngdoc index f66aa9a1..722372b2 100644 --- a/docs/content/api/angular.module.ng.$compileProvider.directive.ngdoc +++ b/docs/content/api/angular.module.ng.$compileProvider.directive.ngdoc @@ -126,8 +126,8 @@ a change in DOM structure such as in repeaters.  When the above example is compiled, the compiler visits every node and looks for directives. The  `{{user}}` is an example of {@link angular.module.ng.$interpolate interpolation} directive. {@link -angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} is another directive. But {@link -angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} has a dilemma. It needs to be +angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} is another directive. But {@link +angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} has a dilemma. It needs to be  able to quickly stamp out new `li`s for every `action` in `user.actions`. This means that it needs  to save a clean copy of the `li` element for cloning purposes and as new `action`s are inserted,  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  links a specific instance of the {@link angular.module.ng.$rootScope.Scope scope} and the specific  instance of an `li` is performed. -{@link angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} works by preventing the +{@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} works by preventing the  compilation process form descending into `li` element. Instead the {@link -angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} directive compiles `li` +angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} directive compiles `li`  seperatly. The result of of the `li` element compilation is a linking function which contains all  of the directives contained in the `li` element ready to be attached to a specific clone of `li` -element. At runtime the {@link angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} +element. At runtime the {@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat}  watches the expression and as items are added to the array it clones the `li` element, creates a  new {@link angular.module.ng.$rootScope.Scope scope} for the cloned `li` element and calls the  link function on the cloned `li`. @@ -415,8 +415,8 @@ compiler}. The attributes are:      append the template to the element.    * `transclude` - compile the content of the element and make it available to the directive. -    Typically used with {@link api/angular.module.ng.$compileProvider.directive.ng-transclude -    ng-transclude}. The advantage of transclusion is that the linking function receives a +    Typically used with {@link api/angular.module.ng.$compileProvider.directive.ngTransclude +    ngTransclude}. The advantage of transclusion is that the linking function receives a      transclusion function which is pre-bound to the correct scope. In a typical setup the widget      creates an `isolate` scope, but the transclusion is not a child, but a sibling of the `isolate`      scope. This makes it possible for the widget to have private state, and the transclusion to @@ -440,8 +440,8 @@ compiler}. The attributes are:  Compile function deals with transforming the template DOM. Since most directives do not do  template transformation, it is not used often. Examples which require compile functions are  directives which transform template DOM such as {@link -angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} or load the contents -asynchronously such as {@link angular.module.ng.$compileProvider.directive.ng-view ng-view}. The +angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} or load the contents +asynchronously such as {@link angular.module.ng.$compileProvider.directive.ngView ngView}. The  compile functions takes the following arguments.    * `tElement` - template element - The element where the directive has been declared. It is diff --git a/docs/content/cookbook/deeplinking.ngdoc b/docs/content/cookbook/deeplinking.ngdoc index db5f057e..10af8a2d 100644 --- a/docs/content/cookbook/deeplinking.ngdoc +++ b/docs/content/cookbook/deeplinking.ngdoc @@ -106,7 +106,7 @@ The two partials are defined in the following URLs:    routes.  * The  {@link api/angular.module.ng.$route $route} service then watches the URL and instantiates the    appropriate controller when the URL changes. -* The  {@link api/angular.module.ng.$compileProvider.directive.ng-view ng-view} widget loads the +* The  {@link api/angular.module.ng.$compileProvider.directive.ngView ngView} widget loads the    view when the URL changes. It also sets the view scope to the newly instantiated controller.  * Changing the URL is sufficient to change the controller and view. It makes no difference whether    the URL is changed programatically or by the user. diff --git a/docs/content/cookbook/form.ngdoc b/docs/content/cookbook/form.ngdoc index b335cecf..e7f87d7c 100644 --- a/docs/content/cookbook/form.ngdoc +++ b/docs/content/cookbook/form.ngdoc @@ -102,7 +102,7 @@ allow a user to enter data.  # Things to notice -* The user data model is initialized {@link api/angular.module.ng.$compileProvider.directive.ng-controller controller} and is +* The user data model is initialized {@link api/angular.module.ng.$compileProvider.directive.ngController controller} and is    available in the {@link api/angular.module.ng.$rootScope.Scope scope} with the initial data.  * For debugging purposes we have included a debug view of the model to better understand what    is going on. diff --git a/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc b/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc index 2567cf68..6fbb528d 100644 --- a/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc +++ b/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc @@ -2,7 +2,7 @@  @name Developer Guide: Initializing Angular: Automatic Initialization  @description -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: +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:  <pre>  <!doctype html> @@ -16,7 +16,7 @@ For Angular to manage the DOM for your application, it needs to compile some or  </html>  </pre> -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: +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:  <pre>  <div ng-app> @@ -24,7 +24,7 @@ You can also tell Angular to manage only a portion of a page.  You would want to  </div>  </pre> -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. +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.  <pre>  <div ng-app="AwesomeModule"> @@ -38,7 +38,7 @@ From a high-level, here's what Angular does during the initialization process:  1. The browser loads the page, and then runs the Angular script. Angular then waits for the  `DOMContentLoaded` (or 'Load') event to attempt to initialize. -2. Angular looks for the `ng-app` directive. If found it compilies the DOM element containing `ng-app` and its children. +2. Angular looks for the `ngApp` directive. If found it compilies the DOM element containing `ngApp` and its children.  3. Angular creates a global variable `angular` and binds all Angular APIs to this object's fields. diff --git a/docs/content/guide/dev_guide.bootstrap.manual_bootstrap.ngdoc b/docs/content/guide/dev_guide.bootstrap.manual_bootstrap.ngdoc index 9f6464b2..c32c2c1a 100644 --- a/docs/content/guide/dev_guide.bootstrap.manual_bootstrap.ngdoc +++ b/docs/content/guide/dev_guide.bootstrap.manual_bootstrap.ngdoc @@ -2,14 +2,14 @@  @name  Developer Guide: Initializing Angular: Manual Initialization  @description -In the vast majority of cases you'll want to let Angular handle initialization automatically.   -If, however, you need to delay Angular from managing the page right after the DOMContentLoaded  +In the vast majority of cases you'll want to let Angular handle initialization automatically. +If, however, you need to delay Angular from managing the page right after the DOMContentLoaded  event fires, you'll need to control this initialization manually. -To initialize Angular -- after you've done your own special-purpose initialization -- just call  +To initialize Angular -- after you've done your own special-purpose initialization -- just call  the {@link api/angular.bootstrap bootstrap()} function with the HTML container node that you want -Angular to manage.  In automatic initialization you'd do this by adding the `ng-app` attribute to  -the same node.  Now, you won't use `ng-app` anywhere in your document. +Angular to manage.  In automatic initialization you'd do this by adding the `ngApp` attribute to +the same node.  Now, you won't use `ngApp` anywhere in your document.  To show the contrast of manual vs. automatic initialization, this automatic method: diff --git a/docs/content/guide/dev_guide.bootstrap.ngdoc b/docs/content/guide/dev_guide.bootstrap.ngdoc index 5ca7d1a8..02351ede 100644 --- a/docs/content/guide/dev_guide.bootstrap.ngdoc +++ b/docs/content/guide/dev_guide.bootstrap.ngdoc @@ -7,7 +7,7 @@ Angular should process and manage the page. To initialize Angular you do the fol  * Specify the Angular namespace in the `<html>` page  * Choose which flavor of Angular script to load (debug or production) -* Specify whether or not Angular should process and manage the page automatically (`ng-app`) +* Specify whether or not Angular should process and manage the page automatically (`ngApp`)  The simplest way to initialize Angular is to load the Angular script and tell Angular to compile  and manage the whole page. You do this as follows: diff --git a/docs/content/guide/dev_guide.di.understanding_di.ngdoc b/docs/content/guide/dev_guide.di.understanding_di.ngdoc index 9b48585c..23b22884 100644 --- a/docs/content/guide/dev_guide.di.understanding_di.ngdoc +++ b/docs/content/guide/dev_guide.di.understanding_di.ngdoc @@ -27,9 +27,9 @@ In the illustration above, the dependency injection sequence proceeds as follows  1. Module "phonecat" is created and all the service providers are registered with this module.     (the "ng" module is created by Angular behind the scenes as well) -2. `ng-app` triggers bootstrap sequence on given element, during which angular creates injector, +2. `ngApp` triggers bootstrap sequence on given element, during which angular creates injector,  loads "phonecat" and "ng" modules and compiles the template. -3. The `ng-controller` directive implicitly creates a new child scope and instantiates +3. The `ngController` directive implicitly creates a new child scope and instantiates  `PhoneListCtrl` controller.  4. Injector identifies the `$http` service as `PhoneListCtrl` controller's only dependency.  5. Injector checks its instances cache whether the `$http` service has already been instantiated. diff --git a/docs/content/guide/dev_guide.forms.ngdoc b/docs/content/guide/dev_guide.forms.ngdoc index 0c3a7fc3..334c590d 100644 --- a/docs/content/guide/dev_guide.forms.ngdoc +++ b/docs/content/guide/dev_guide.forms.ngdoc @@ -12,9 +12,9 @@ Server-side validation is still necessary for a secure application.  # Simple form -The key directive in understanding two-way data-binding is  {@link api/angular.module.ng.$compileProvider.directive.ng-model ng-model}. -The `ng-model` provides the two-way data-binding by synchronizing the model to the view, as well as view to the model. -In addition it provides {@link api/angular.module.ng.$compileProvider.directive.ng-model.NgModelController API} for other directives to augment its behavior. +The key directive in understanding two-way data-binding is  {@link api/angular.module.ng.$compileProvider.directive.ngModel ngModel}. +The `ngModel` directive provides the two-way data-binding by synchronizing the model to the view, as well as view to the model. +In addition it provides {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController API} for other directives to augment its behavior.  <doc:example>  <doc:source> @@ -56,7 +56,7 @@ Note that `novalidate` is used to disable browser's native form validation.  # Using CSS classes -To allow styling of form as well as controls, `ng-model`  add these CSS classes: +To allow styling of form as well as controls, `ngModel`  add these CSS classes:  - `ng-valid`  - `ng-invalid` @@ -115,7 +115,7 @@ This ensures that the user is not distracted with an error until after interacti  A form is in instance of {@link api/angular.module.ng.$compileProvider.directive.form.FormController FormController}.  The form instance can optionally be published into the scope using the `name` attribute. -Similarly control is an instance of {@link api/angular.module.ng.$compileProvider.directive.ng-model.NgModelController NgModelController}. +Similarly control is an instance of {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController NgModelController}.  The control instance can similarly be published into the form instance using the `name` attribute.  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. @@ -181,16 +181,16 @@ This allows us to extend the above example with these features:  Angular provides basic implementation for most common html5 {@link api/angular.module.ng.$compileProvider.directive.input input}  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`). -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}. +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}.  To get a hold of the controller the directive specifies a dependency as shown in the example below.  The validation can occur in two places:    * **Model to View update** - -    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}. +    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}.    * **View to Model update** - -    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}. -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}. +    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}. +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}.  In the following example we create two directives. @@ -272,13 +272,13 @@ In the following example we create two directives.  </doc:example> -# Implementing custom form control (using ng-model) +# Implementing custom form control (using `ngModel`)  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.  However, if you need more flexibility, you can write your own form control as a directive. -In order for custom control to work with `ng-model` and to achieve two-way data-binding it needs to: +In order for custom control to work with `ngModel` and to achieve two-way data-binding it needs to: -  - 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}, +  - 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},    - 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.  See {@link api/angular.module.ng.$compileProvider.directive $compileProvider.directive} for more info. diff --git a/docs/content/guide/dev_guide.i18n.ngdoc b/docs/content/guide/dev_guide.i18n.ngdoc index 5ba627ab..ba88a2e7 100644 --- a/docs/content/guide/dev_guide.i18n.ngdoc +++ b/docs/content/guide/dev_guide.i18n.ngdoc @@ -22,7 +22,7 @@ http://docs.angularjs.org/#!/api/angular.module.ng.$filter.number number} and {@  http://docs.angularjs.org/#!/api/angular.module.ng.$filter.currency currency} filters.  Additionally, Angular supports localizable pluralization support provided by the {@link -api/angular.module.ng.$compileProvider.directive.ng-pluralize ng-pluralize directive}. +api/angular.module.ng.$compileProvider.directive.ngPluralize ngPluralize directive}.  All localizable Angular components depend on locale-specific rule sets managed by the {@link  api/angular.module.ng.$locale $locale service}. diff --git a/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc b/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc index 36ceed4f..deccbeee 100644 --- a/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc +++ b/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc @@ -42,11 +42,12 @@ template/view. This behavior interacts with and modifies the application model.  As discussed in the {@link dev_guide.mvc.understanding_model Model} section of this guide, any  objects (or primitives) assigned to the scope become model properties. Any functions assigned to  the scope, along with any prototype methods of the controller type, become functions available in -the template/view, and can be invoked via angular expressions and `ng-` event handlers (e.g. {@link -api/angular.module.ng.$compileProvider.directive.ng-click ng-click}). These controller methods are always evaluated within the -context of the angular scope object that the controller function was applied to (which means that -the `this` keyword of any controller method is always bound to the scope that the controller -augments). This is how the second task of adding behavior to the scope is accomplished. +the template/view, and can be invoked via angular expressions and `ng` event handler directives +(e.g. {@link api/angular.module.ng.$compileProvider.directive.ngClick ngClick}). These controller +methods are always evaluated within the context of the angular scope object that the controller +function was applied to (which means that the `this` keyword of any controller method is always +bound to the scope that the controller augments). This is how the second task of adding behavior to +the scope is accomplished.  # Using Controllers Correctly @@ -78,7 +79,7 @@ instances).  # Associating Controllers with Angular Scope Objects  You can associate controllers with scope objects explicitly via the {@link api/angular.module.ng.$rootScope.Scope#$new -scope.$new} api or implicitly via the {@link api/angular.module.ng.$compileProvider.directive.ng-controller ng-controller +scope.$new} api or implicitly via the {@link api/angular.module.ng.$compileProvider.directive.ngController ngController  directive} or {@link api/angular.module.ng.$route $route service}. @@ -119,7 +120,7 @@ SpicyCtrl.prototype.jalapenoSpicy = function() {  Things to notice in the example above: -- The `ng-controller` directive is used to (implicitly) create a scope for our template, and the +- The `ngController` directive is used to (implicitly) create a scope for our template, and the  scope is augmented (managed) by the `SpicyCtrl` controller.  - `SpicyCtrl` is just a plain JavaScript function. As an (optional) naming convention the name  starts with capital letter and ends with "Ctrl" or "Controller". @@ -186,7 +187,7 @@ function BabyCtrl($scope) {  }  </pre> -Notice how we nested three `ng-controller` directives in our template. This template construct will +Notice how we nested three `ngController` directives in our template. This template construct will  result in 4 scopes being created for our view:  - The root scope diff --git a/docs/content/guide/dev_guide.mvc.understanding_model.ngdoc b/docs/content/guide/dev_guide.mvc.understanding_model.ngdoc index e8874c49..06557b8d 100644 --- a/docs/content/guide/dev_guide.mvc.understanding_model.ngdoc +++ b/docs/content/guide/dev_guide.mvc.understanding_model.ngdoc @@ -30,7 +30,7 @@ occurs in controllers:           <button ng-click="{{foos='ball'}}">Click me</button> -* Use {@link api/angular.module.ng.$compileProvider.directive.ng-init ng-init directive} in templates (for toy/example apps +* Use {@link api/angular.module.ng.$compileProvider.directive.ngInit ngInit directive} in templates (for toy/example apps  only, not recommended for real applications):           <body ng-init=" foo = 'bar' "> @@ -45,7 +45,7 @@ when processing the following template constructs:     The code above creates a model called "query" on the current scope with the value set to "fluffy  cloud". -* An iterator declaration in {@link api/angular.module.ng.$compileProvider.directive.ng-repeat ng-repeater}: +* An iterator declaration in {@link api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeater}:           <p ng-repeat="phone in phones"></p> diff --git a/docs/content/guide/dev_guide.mvc.understanding_view.ngdoc b/docs/content/guide/dev_guide.mvc.understanding_view.ngdoc index 6e34f8c8..7c6b2e5a 100644 --- a/docs/content/guide/dev_guide.mvc.understanding_view.ngdoc +++ b/docs/content/guide/dev_guide.mvc.understanding_view.ngdoc @@ -9,8 +9,8 @@ the DOM based on information in the template, controller and model.  In the angular implementation of MVC, the view has knowledge of both the model and the controller.  The view knows about the model where two-way data-binding occurs. The view has knowledge of the -controller through angular directives, such as {@link api/angular.module.ng.$compileProvider.directive.ng-controller -ng-controller} and {@link api/angular.module.ng.$compileProvider.directive.ng-view ng-view}, and through bindings of this form: +controller through angular directives, such as {@link api/angular.module.ng.$compileProvider.directive.ngController +ngController} and {@link api/angular.module.ng.$compileProvider.directive.ngView ngView}, and through bindings of this form:  `{{someControllerFunction()}}`. In these ways, the view can call functions in an associated  controller function. diff --git a/docs/content/guide/dev_guide.overview.ngdoc b/docs/content/guide/dev_guide.overview.ngdoc index 4c9c2953..e44a9cef 100644 --- a/docs/content/guide/dev_guide.overview.ngdoc +++ b/docs/content/guide/dev_guide.overview.ngdoc @@ -79,8 +79,8 @@ easier a web developer's life can if they're using angular:  Try out the Live Preview above, and then let's walk through the example and describe what's going  on. -In the `<html>` tag we specify that this is an angular application with the `ng-app` directive. -The `ng-app' will cause the angular to {@link dev_guide.bootstrap auto initialize} your application. +In the `<html>` tag we specify that this is an angular application with the `ngApp` directive. +The `ngApp' will cause the angular to {@link dev_guide.bootstrap auto initialize} your application.          <html ng-app> @@ -88,7 +88,7 @@ We load the angular using the  `<script>` tag:      <script src="http://code.angularjs.org/angular-?.?.?.min.js"></script> -From the `ng-model` attribute of the `<input>` tags, angular automatically sets up two-way data +From the `ngModel` attribute of the `<input>` tags, angular automatically sets up two-way data  binding, and we also demonstrate some easy input validation:          Quantity: <input type="integer" min="0" ng-model="qty" required > @@ -112,7 +112,7 @@ And finally, the mysterious `{{ double curly braces }}`:  This notation, `{{ _expression_ }}`, is a bit of built-in angular binding markup, a shortcut for  displaying data to the user. The expression within curly braces is monitored and its evaluated value  is updated into the view by angular's template compiler. Alternatively, one could use angular's -{@link api/angular.module.ng.$compileProvider.directive.ng-bind ng-bind}) directive. The expression +{@link api/angular.module.ng.$compileProvider.directive.ngBind ngBind}) directive. The expression  itself can be a combination of both an expression and a {@link dev_guide.templates.filters filter}:  `{{ expression | filter }}`. Angular provides filters for formatting display data. diff --git a/docs/content/guide/dev_guide.scopes.internals.ngdoc b/docs/content/guide/dev_guide.scopes.internals.ngdoc index bca9583f..1cc2b2a8 100644 --- a/docs/content/guide/dev_guide.scopes.internals.ngdoc +++ b/docs/content/guide/dev_guide.scopes.internals.ngdoc @@ -47,7 +47,7 @@ recursively check the parent scope, grandparent scope, etc. all the way to the r  defaulting to undefined.  {@link api/angular.module.ng.$compileProvider.directive directives} associated with elements -(ng-controller, ng-repeat, ng-include, etc.) create new child scopes that inherit properties from +(ngController, ngRepeat, ngInclude, etc.) create new child scopes that inherit properties from  the current parent scope. Any code in Angular is free to create a new scope. Whether or not your  code does so is an implementation detail of the directive, that is, you can decide when or if this  happens. Inheritance typically mimics HTML DOM element nesting, but does not do so with the same @@ -123,8 +123,8 @@ usually fall into one of two categories:      expressions `{{expression}}`, register listeners using the {@link      api/angular.module.ng.$rootScope.Scope#$watch $watch()} method. This type of directive needs to      be notified whenever the expression changes so that it can update the view. -   -  Listener directives, such as {@link api/angular.module.ng.$compileProvider.directive.ng-click -   ng-click}, register a listener with the DOM. When the DOM listener fires, the directive executes +   -  Listener directives, such as {@link api/angular.module.ng.$compileProvider.directive.ngClick +   ngClick}, register a listener with the DOM. When the DOM listener fires, the directive executes     the associated expression and updates the view using  the {@link     api/angular.module.ng.$rootScope.Scope#$apply $apply()} method.  3. When an external event (such as a user action, timer or XHR) is received, the associated {@link @@ -134,8 +134,8 @@ api/angular.module.ng.$rootScope.Scope#$apply $apply()} method so that all liste  ### Directives that create scopes  In most cases, {@link api/angular.module.ng.$compileProvider.directive directives} and scopes interact but do not create new -instances of scope. However, some directives, such as {@link api/angular.module.ng.$compileProvider.directive.ng-controller -ng-controller} and {@link api/angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat}, create new child scopes using +instances of scope. However, some directives, such as {@link api/angular.module.ng.$compileProvider.directive.ngController +ngController} and {@link api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat}, create new child scopes using  the {@link api/angular.module.ng.$rootScope.Scope#$new $new()} method and then attach the child scope to the  corresponding DOM element. You can retrieve a scope for any DOM element by using an  `angular.element(aDomElement).scope()` method call.) @@ -144,7 +144,7 @@ corresponding DOM element. You can retrieve a scope for any DOM element by using  ### Controllers and scopes  Scopes and controllers interact with each other in the following situations:     - Controllers use scopes to expose controller methods to templates (see {@link -api/angular.module.ng.$compileProvider.directive.ng-controller ng-controller}). +api/angular.module.ng.$compileProvider.directive.ngController ngController}).     - Controllers define methods (behavior) that can mutate the model (properties on the scope).     - Controllers may register {@link api/angular.module.ng.$rootScope.Scope#$watch watches} on the model. These watches  execute immediately after the controller behavior executes, but before the DOM gets updated. @@ -170,7 +170,7 @@ $watch-ers firing and view getting updated. Similarly, when a request to fetch d  is made and the response comes back, the data is written into the model (scope) within an $apply,  which then pushes updates through to the view and any other dependents. -A widget that creates scopes (such as {@link api/angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat}) via `$new`, +A widget that creates scopes (such as {@link api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat}) via `$new`,  doesn't need to worry about propagating the `$digest` call from the parent scope to child scopes.  This happens automatically. diff --git a/docs/content/guide/dev_guide.scopes.ngdoc b/docs/content/guide/dev_guide.scopes.ngdoc index 330b715d..6ddbcae4 100644 --- a/docs/content/guide/dev_guide.scopes.ngdoc +++ b/docs/content/guide/dev_guide.scopes.ngdoc @@ -14,7 +14,7 @@ the contexts in which Angular creates data-bindings between the model and the vi  In addition to providing the context in which data is evaluated, Angular scope objects watch for  model changes. The scope objects also notify all components interested in any model changes (for  example, functions registered through {@link api/angular.module.ng.$rootScope.Scope#$watch $watch}, bindings created by -{@link api/angular.module.ng.$compileProvider.directive.ng-bind ng-bind}, or HTML input elements). +{@link api/angular.module.ng.$compileProvider.directive.ngBind ngBind}, or HTML input elements).  Angular scope objects: diff --git a/docs/content/guide/dev_guide.scopes.understanding_scopes.ngdoc b/docs/content/guide/dev_guide.scopes.understanding_scopes.ngdoc index aa8a97e0..aeab3191 100644 --- a/docs/content/guide/dev_guide.scopes.understanding_scopes.ngdoc +++ b/docs/content/guide/dev_guide.scopes.understanding_scopes.ngdoc @@ -45,7 +45,7 @@ code, observe how the value of `name` changes, based on the HTML element it is d  </doc:scenario>  </doc:example> -The angular {@link api/angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} directive creates a new scope for each +The angular {@link api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} directive creates a new scope for each  element that it repeats (in this example the elements are list items). In the `<ul>` element, we  initialized `name` to "Hank", and we created an array called `names` to use as the data source for  the list items. In each `<li>` element, `name` is overridden. Outside of the `<li>` repeater, the diff --git a/docs/content/guide/dev_guide.services.$location.ngdoc b/docs/content/guide/dev_guide.services.$location.ngdoc index f5790725..c99d26b0 100644 --- a/docs/content/guide/dev_guide.services.$location.ngdoc +++ b/docs/content/guide/dev_guide.services.$location.ngdoc @@ -316,7 +316,7 @@ When a user clicks on this link,  In cases like the following, links are not rewritten; instead, the browser will perform a full page  reload to the original link. -- Links with an `ng-ext-link` directive<br /> +- Links with an `ngExtLink` directive<br />    Example: `<a href="/ext/link?a=b" ng-ext-link>link</a>`  - Links that contain `target="_blank"`<br />    Example: `<a href="/ext/link?a=b" target="_blank">link</a>` diff --git a/docs/content/guide/dev_guide.templates.css-styling.ngdoc b/docs/content/guide/dev_guide.templates.css-styling.ngdoc index 11eba2d1..30250bea 100644 --- a/docs/content/guide/dev_guide.templates.css-styling.ngdoc +++ b/docs/content/guide/dev_guide.templates.css-styling.ngdoc @@ -9,10 +9,10 @@ Angular sets these CSS classes. It is up to your application to provide useful s  * `ng-invalid`, `ng-valid`    - **Usage:** angular applies this class to an input widget element if that element's input does -    notpass validation. (see {@link api/angular.module.ng.$compileProvider.directive.input input} widget). +    notpass validation. (see {@link api/angular.module.ng.$compileProvider.directive.input input} directive).  * `ng-pristine`, `ng-dirty` -  - **Usage:** angular {@link api/angular.module.ng.$compileProvider.directive.input input} widget applies `ng-pristine` class +  - **Usage:** angular {@link api/angular.module.ng.$compileProvider.directive.input input} directive applies `ng-pristine` class      to a new input widget element which did not have user interaction. Once the user interacts with      the input widget the class is changed to `ng-dirty`. diff --git a/docs/content/guide/dev_guide.templates.ngdoc b/docs/content/guide/dev_guide.templates.ngdoc index 60e6a39b..54d582ca 100644 --- a/docs/content/guide/dev_guide.templates.ngdoc +++ b/docs/content/guide/dev_guide.templates.ngdoc @@ -26,7 +26,7 @@ with {@link dev_guide.expressions expressions}:  <pre>  <html ng-app> - <!-- Body tag augmented with ng-controller directive  --> + <!-- Body tag augmented with ngController directive  -->   <body ng-controller="MyController">     <input ng-model="foo" value="bar">     <!-- Button tag with ng-click directive, and @@ -42,7 +42,7 @@ In a simple single-page app, the template consists of HTML, CSS, and angular dir  in just one HTML file (usually `index.html`). In a more complex app, you can display multiple views  within one main page using "partials", which are segments of template located in separate HTML  files.  You "include" the partials in the main page using the {@link api/angular.module.ng.$route -$route} service in conjunction with the {@link api/angular.module.ng.$compileProvider.directive.ng-view ng-view} directive. An +$route} service in conjunction with the {@link api/angular.module.ng.$compileProvider.directive.ngView ngView} directive. An  example of this technique is shown in the {@link tutorial/ angular tutorial}, in steps seven and  eight. diff --git a/docs/content/tutorial/step_00.ngdoc b/docs/content/tutorial/step_00.ngdoc index 643ec23b..63123926 100644 --- a/docs/content/tutorial/step_00.ngdoc +++ b/docs/content/tutorial/step_00.ngdoc @@ -172,9 +172,10 @@ __`app/index.html`:__            <html ng-app> -  `ng-app` directive is a special tag used to flag an element which Angular should consider to be -  the root element of our application. This gives application developers the freedom to tell Angular -  if the entire html page or only a portion of it should be treated as the Angular application. +  The `ng-app` attribute is represents an Angular directive used to flag an element which Angular +  should consider to be the root element of our application. This gives application developers the +  freedom to tell Angular if the entire html page or only a portion of it should be treated as the +  Angular application.  * AngularJS script tag: @@ -182,9 +183,9 @@ __`app/index.html`:__    This code downloads the `angular.js` script and registers a callback that will be executed by the  browser when the containing HTML page is fully downloaded. When the callback is executed, Angular -looks for the {@link api/angular.module.ng.$compileProvider.directive.ng-app ng-app} directive. If -Angular finds `ng-app`, it will bootstrap the application with the root of the application DOM being -the element on which the `ng-app` directive was defined. +looks for the {@link api/angular.module.ng.$compileProvider.directive.ngApp ngApp} directive. If +Angular finds the directive, it will bootstrap the application with the root of the application DOM +being the element on which the `ngApp` directive was defined.  * Double-curly binding with an expression: @@ -207,7 +208,7 @@ the element on which the `ng-app` directive was defined.  ## Bootstrapping AngularJS apps -Bootstrapping AngularJS apps automatically using the `ng-app` directive is very easy and suitable +Bootstrapping AngularJS apps automatically using the `ngApp` directive is very easy and suitable  for most cases. In advanced cases, such as when using script loaders, you can use  {@link guide/dev_guide.bootstrap.manual_bootstrap imperative / manual way} to bootstrap the app. @@ -219,7 +220,7 @@ There are 3 important things that happen during the app bootstrap:  2. The injector will then create the {@link api/angular.module.ng.$rootScope root scope} that will     become the context for the model of our application. -3. Angular will then "compile" the DOM starting at the `ng-app` root element, processing any +3. Angular will then "compile" the DOM starting at the `ngApp` root element, processing any     directives and bindings found along the way. @@ -267,6 +268,6 @@ Now let's go to {@link step_01 step 1} and add some content to the web app.  Move elsewhere:  Note: During the bootstrap the injector and the root scope will then be associated with the -   element on which `ng-app` was declared, so when debugging the app you can retrieve them from -   browser console via `angular.element(rootElement).scope()` and +   element on which the `ngApp` directive was declared, so when debugging the app you can retrieve +   them from browser console via `angular.element(rootElement).scope()` and     `angular.element(rootElement).injector()`. diff --git a/docs/content/tutorial/step_02.ngdoc b/docs/content/tutorial/step_02.ngdoc index e0ca2829..6968f479 100644 --- a/docs/content/tutorial/step_02.ngdoc +++ b/docs/content/tutorial/step_02.ngdoc @@ -52,7 +52,7 @@ __`app/index.html`:__  </pre>  We replaced the hard-coded phone list with the -{@link api/angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat directive} and two +{@link api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat directive} and two  {@link guide/dev_guide.expressions Angular expressions} enclosed in curly braces:  `{{phone.name}}` and `{{phone.snippet}}`: @@ -94,7 +94,7 @@ as follows:  * `PhoneListCtrl` — the name of our controller function (located in the JavaScript file  `controllers.js`), matches the value of the -{@link api/angular.module.ng.$compileProvider.directive.ng-controller ng-controller} directive located +{@link api/angular.module.ng.$compileProvider.directive.ngController ngController} directive located  on the `<body>` tag.  * The phone data is then attached to the *scope* (`$scope`) that was injected into our controller diff --git a/docs/content/tutorial/step_03.ngdoc b/docs/content/tutorial/step_03.ngdoc index 3c997337..a8db32bc 100644 --- a/docs/content/tutorial/step_03.ngdoc +++ b/docs/content/tutorial/step_03.ngdoc @@ -45,7 +45,7 @@ __`app/index.html`:__  We added a standard HTML `<input>` tag and used angular's  {@link api/angular.module.ng.$filter.filter $filter} function to process the input for the -`ng-repeater`. +`ngRepeate` directive.  This lets a user enter search criteria and immediately see the effects of their search on the phone  list. This new code demonstrates the following: @@ -63,7 +63,7 @@ the DOM to reflect the current state of the model.  * Use of `filter` filter. The {@link api/angular.module.ng.$filter.filter filter} function uses the  `query` value to create a new array that contains only those records that match the `query`. -  `ng-repeat` automatically updates the view in response to the changing number of phones returned +  `ngRepeat` automatically updates the view in response to the changing number of phones returned  by the `filter` filter. The process is completely transparent to the developer.  ## Test @@ -131,7 +131,7 @@ model lives in the scope defined by the body element:            <body ng-controller="PhoneListCtrl">    If you want to bind to the query model from the `<title>` element, you must __move__ the -`ng-controller` declaration to the HTML element because it is the common parent of both the body +`ngController` declaration to the HTML element because it is the common parent of both the body  and title elements:            <html ng-app ng-controller="PhoneListCtrl"> @@ -140,9 +140,9 @@ and title elements:    While using double curlies works fine in within the title element, you might have noticed that  for a split second they are actually displayed to the user while the page is loading. A better -solution would be to use the {@link api/angular.module.ng.$compileProvider.directive.ng-bind -ng-bind} or {@link api/angular.module.ng.$compileProvider.directive.ng-bind-template -ng-bind-template} directives, which are invisible to the user while the page is loading: +solution would be to use the {@link api/angular.module.ng.$compileProvider.directive.ngBind +ngBind} or {@link api/angular.module.ng.$compileProvider.directive.ngBindTemplate +ngBindTemplate} directives, which are invisible to the user while the page is loading:            <title ng-bind-template="Google Phone Gallery: {{query}}">Google Phone Gallery</title> diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js index 4dd3dcc0..70411052 100644 --- a/docs/src/ngdoc.js +++ b/docs/src/ngdoc.js @@ -372,10 +372,10 @@ Doc.prototype = {          dom.text(')');          dom.code(function() {            dom.text('<'); -          dom.text(self.shortName); +          dom.text(dashCase(self.shortName));            renderParams('\n       ', '="', '"');            dom.text('>\n</'); -          dom.text(self.shortName); +          dom.text(dashCase(self.shortName));            dom.text('>');          });        } @@ -384,7 +384,7 @@ Doc.prototype = {          dom.text('as attribute');          dom.code(function() {            dom.text('<' + element + ' '); -          dom.text(self.shortName); +          dom.text(dashCase(self.shortName));            renderParams('\n     ', '="', '"', true);            dom.text('>\n   ...\n');            dom.text('</' + element + '>'); @@ -395,7 +395,7 @@ Doc.prototype = {          var element = self.element || 'ANY';          dom.code(function() {            dom.text('<' + element + ' class="'); -          dom.text(self.shortName); +          dom.text(dashCase(self.shortName));            renderParams(' ', ': ', ';', true);            dom.text('">\n   ...\n');            dom.text('</' + element + '>'); @@ -467,7 +467,7 @@ Doc.prototype = {          (self.param||[]).forEach(function(param){            dom.text('\n      ');            dom.text(param.optional ? ' [' : ' '); -          dom.text(param.name); +          dom.text(dashCase(param.name));            dom.text(BOOLEAN_ATTR[param.name] ? '' : '="{' + param.type + '}"');            dom.text(param.optional ? ']' : '');          }); @@ -822,3 +822,11 @@ function property(name) {      return value[name];    };  } + + +var DASH_CASE_REGEXP = /[A-Z]/g; +function dashCase(name){ +  return name.replace(DASH_CASE_REGEXP, function(letter, pos) { +    return (pos ? '-' : '') + letter.toLowerCase(); +  }); +} diff --git a/src/Angular.js b/src/Angular.js index c0da2174..c5b70e3c 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -435,7 +435,7 @@ function makeMap(str){  /** - * HTML class which is the only class which can be used in ng-bind to inline HTML for security + * HTML class which is the only class which can be used in ngBind to inline HTML for security   * reasons.   *   * @constructor @@ -873,10 +873,10 @@ function encodeUriQuery(val, pctEncodeSpaces) {  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-app + * @name angular.module.ng.$compileProvider.directive.ngApp   *   * @element ANY - * @param {angular.Module} ng-app on optional application + * @param {angular.Module} ngApp on optional application   *   {@link angular.module module} name to load.   *   * @description @@ -886,11 +886,11 @@ function encodeUriQuery(val, pctEncodeSpaces) {   * designates the root of the application and is typically placed   * ot the root of the page.   * - * In the example below if the `ng-app` directive would not be placed + * In the example below if the `ngApp` directive would not be placed   * on the `html` element then the document would not be compiled   * and the `{{ 1+2 }}` would not be resolved to `3`.   * - * `ng-app` is the easiest way to bootstrap an application. + * `ngApp` is the easiest way to bootstrap an application.   *   <doc:example>     <doc:source> diff --git a/src/jqLite.js b/src/jqLite.js index 007deaa8..cb533a5e 100644 --- a/src/jqLite.js +++ b/src/jqLite.js @@ -61,7 +61,7 @@   * ## In addtion to the above, Angular privides an additional method to both jQuery and jQuery lite:   *   * - `controller(name)` - retrieves the controller of the current element or its parent. By default - *   retrieves controller associated with the `ng-controller` directive. If `name` is provided as + *   retrieves controller associated with the `ngController` directive. If `name` is provided as   *   camelCase directive name, then the controller for this directive will be retrieved (e.g.   *   `'ngModel'`).   * - `injector()` - retrieves the injector of the current element or its parent. diff --git a/src/loader.js b/src/loader.js index b25fc40e..e0dd8d7f 100644 --- a/src/loader.js +++ b/src/loader.js @@ -54,7 +54,7 @@ function setupModuleLoader(window) {       * </pre>       *       * However it's more likely that you'll just use -     * {@link angular.module.ng.$compileProvider.directive.ng-app ng-app} or +     * {@link angular.module.ng.$compileProvider.directive.ngApp ngApp} or       * {@link angular.bootstrap} to simplify this process for you.       *       * @param {!string} name The name of the module to create or retrieve. diff --git a/src/ng/compiler.js b/src/ng/compiler.js index bbbcedb7..912b068a 100644 --- a/src/ng/compiler.js +++ b/src/ng/compiler.js @@ -15,7 +15,7 @@   * instance functions into a single template function which is then returned.   *   * The template function can then be used once to produce the view or as it is the case with - * {@link angular.module.ng.$compileProvider.directive.ng-repeat repeater} many-times, in which + * {@link angular.module.ng.$compileProvider.directive.ngRepeat repeater} many-times, in which   * case each call results in a view that is a DOM clone of the original template.   *   <doc:example module="compile"> diff --git a/src/ng/directive/a.js b/src/ng/directive/a.js index d96af784..04a77129 100644 --- a/src/ng/directive/a.js +++ b/src/ng/directive/a.js @@ -4,8 +4,8 @@   * Modifies the default behavior of html A tag, so that the default action is prevented when href   * attribute is empty.   * - * The reasoning for this change is to allow easy creation of action links with ng-click without - * changing the location or causing page reloads, e.g.: + * The reasoning for this change is to allow easy creation of action links with `ngClick` directive + * without changing the location or causing page reloads, e.g.:   * <a href="" ng-click="model.$save()">Save</a>   */  var htmlAnchorDirective = valueFn({ diff --git a/src/ng/directive/booleanAttrs.js b/src/ng/directive/booleanAttrs.js index fee10ed8..c9f286fb 100644 --- a/src/ng/directive/booleanAttrs.js +++ b/src/ng/directive/booleanAttrs.js @@ -2,7 +2,7 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-href + * @name angular.module.ng.$compileProvider.directive.ngHref   * @restrict A   *   * @description @@ -10,8 +10,7 @@   * the page open to a wrong URL, if the user clicks that link before   * angular has a chance to replace the {{hash}} with actual URL, the   * link will be broken and will most likely return a 404 error. - * The `ng-href` solves this problem by placing the `href` in the - * `ng-` namespace. + * The `ngHref` directive solves this problem.   *   * The buggy way to write it:   * <pre> @@ -24,7 +23,7 @@   * </pre>   *   * @element A - * @param {template} ng-href any string which can contain `{{}}` markup. + * @param {template} ngHref any string which can contain `{{}}` markup.   *   * @example   * This example uses `link` variable inside `href` attribute: @@ -83,15 +82,14 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-src + * @name angular.module.ng.$compileProvider.directive.ngSrc   * @restrict A   *   * @description - * Using <angular/> markup like `{{hash}}` in a `src` attribute doesn't + * Using Angular markup like `{{hash}}` in a `src` attribute doesn't   * work right: The browser will fetch from the URL with the literal - * text `{{hash}}` until <angular/> replaces the expression inside - * `{{hash}}`. The `ng-src` attribute solves this problem by placing - *  the `src` attribute in the `ng-` namespace. + * text `{{hash}}` until Angular replaces the expression inside + * `{{hash}}`. The `ngSrc` directive solves this problem.   *   * The buggy way to write it:   * <pre> @@ -104,12 +102,12 @@   * </pre>   *   * @element IMG - * @param {template} ng-src any string which can contain `{{}}` markup. + * @param {template} ngSrc any string which can contain `{{}}` markup.   */  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-disabled + * @name angular.module.ng.$compileProvider.directive.ngDisabled   * @restrict A   *   * @description @@ -124,7 +122,7 @@   * The HTML specs do not require browsers to preserve the special attributes such as disabled.   * (The presence of them means true and absence means false)   * This prevents the angular compiler from correctly retrieving the binding expression. - * To solve this problem, we introduce ng-disabled. + * To solve this problem, we introduce the `ngDisabled` directive.   *   * @example      <doc:example> @@ -142,20 +140,20 @@      </doc:example>   *   * @element INPUT - * @param {string} expression Angular expression that will be evaluated. + * @param {expression} ngDisabled Angular expression that will be evaluated.   */  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-checked + * @name angular.module.ng.$compileProvider.directive.ngChecked   * @restrict A   *   * @description   * The HTML specs do not require browsers to preserve the special attributes such as checked.   * (The presence of them means true and absence means false)   * This prevents the angular compiler from correctly retrieving the binding expression. - * To solve this problem, we introduce ng-checked. + * To solve this problem, we introduce the `ngChecked` directive.   * @example      <doc:example>        <doc:source> @@ -172,20 +170,20 @@      </doc:example>   *   * @element INPUT - * @param {string} expression Angular expression that will be evaluated. + * @param {expression} ngChecked Angular expression that will be evaluated.   */  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-multiple + * @name angular.module.ng.$compileProvider.directive.ngMultiple   * @restrict A   *   * @description   * The HTML specs do not require browsers to preserve the special attributes such as multiple.   * (The presence of them means true and absence means false)   * This prevents the angular compiler from correctly retrieving the binding expression. - * To solve this problem, we introduce ng-multiple. + * To solve this problem, we introduce the `ngMultiple` directive.   *   * @example       <doc:example> @@ -208,20 +206,20 @@       </doc:example>   *   * @element SELECT - * @param {string} expression Angular expression that will be evaluated. + * @param {expression} ngMultiple Angular expression that will be evaluated.   */  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-readonly + * @name angular.module.ng.$compileProvider.directive.ngReadonly   * @restrict A   *   * @description   * The HTML specs do not require browsers to preserve the special attributes such as readonly.   * (The presence of them means true and absence means false)   * This prevents the angular compiler from correctly retrieving the binding expression. - * To solve this problem, we introduce ng-readonly. + * To solve this problem, we introduce the `ngReadonly` directive.   * @example      <doc:example>        <doc:source> @@ -244,14 +242,14 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-selected + * @name angular.module.ng.$compileProvider.directive.ngSelected   * @restrict A   *   * @description   * The HTML specs do not require browsers to preserve the special attributes such as selected.   * (The presence of them means true and absence means false)   * This prevents the angular compiler from correctly retrieving the binding expression. - * To solve this problem, we introduce ng-selected. + * To solve this problem, we introduced the `ngSelected` directive.   * @example      <doc:example>        <doc:source> diff --git a/src/ng/directive/form.js b/src/ng/directive/form.js index f688b542..ecb47ebe 100644 --- a/src/ng/directive/form.js +++ b/src/ng/directive/form.js @@ -124,7 +124,7 @@ function FormController(element, attrs) {  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-form + * @name angular.module.ng.$compileProvider.directive.ngForm   * @restrict EAC   *   * @description @@ -132,7 +132,7 @@ function FormController(element, attrs) {   * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a   * sub-group of controls needs to be determined.   * - * @param {string=} ng-form|name Name of the form. If specified, the form controller will be published into + * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into   *                       related scope, under this name.   *   */ @@ -149,11 +149,11 @@ function FormController(element, attrs) {   * If `name` attribute is specified, the form controller is published onto the current scope under   * this name.   * - * # Alias: {@link angular.module.ng.$compileProvider.directive.ng-form `ng-form`} + * # Alias: {@link angular.module.ng.$compileProvider.directive.ngForm `ngForm`}   *   * In angular forms can be nested. This means that the outer form is valid when all of the child   * forms are valid as well. However browsers do not allow nesting of `<form>` elements, for this - * reason angular provides {@link angular.module.ng.$compileProvider.directive.ng-form `ng-form`} alias + * reason angular provides {@link angular.module.ng.$compileProvider.directive.ngForm `ngForm`} alias   * which behaves identical to `<form>` but allows form nesting.   *   * @@ -177,19 +177,20 @@ function FormController(element, attrs) {   * You can use one of the following two ways to specify what javascript method should be called when   * a form is submitted:   * - * - ng-submit on the form element (add link to ng-submit) - * - ng-click on the first button or input field of type submit (input[type=submit]) + * - {@link angular.module.ng.$compileProvider.directive.ngSubmit ngSubmit} directive on the form element + * - {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} directive on the first +  *  button or input field of type submit (input[type=submit])   * - * To prevent double execution of the handler, use only one of ng-submit or ng-click. This is - * because of the following form submission rules coming from the html spec: + * To prevent double execution of the handler, use only one of ngSubmit or ngClick directives. This + * is because of the following form submission rules coming from the html spec:   *   * - If a form has only one input field then hitting enter in this field triggers form submit - * (`ng-submit`) + * (`ngSubmit`)   * - if a form has has 2+ input fields and no buttons or input[type=submit] then hitting enter   * doesn't trigger submit   * - if a form has one or more input fields and one or more buttons or input[type=submit] then   * hitting enter in any of the input fields will trigger the click handler on the *first* button or - * input[type=submit] (`ng-click`) *and* a submit handler on the enclosing form (`ng-submit`) + * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)   *   * @param {string=} name Name of the form. If specified, the form controller will be published into   *                       related scope, under this name. diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index aab12e34..6366f901 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -13,17 +13,17 @@ var inputType = {     * @description     * Standard HTML text input with angular data binding.     * -   * @param {string} ng-model Assignable angular expression to data-bind to. +   * @param {string} ngModel Assignable angular expression to data-bind to.     * @param {string=} name Property name of the form under which the control is published.     * @param {string=} required Sets `required` validation error key if the value is not entered. -   * @param {number=} ng-minlength Sets `minlength` validation error key if the value is shorter than +   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than     *    minlength. -   * @param {number=} ng-maxlength Sets `maxlength` validation error key if the value is longer than +   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than     *    maxlength. -   * @param {string=} ng-pattern Sets `pattern` validation error key if the value does not match the +   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the     *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for     *    patterns defined as scope expressions. -   * @param {string=} ng-change Angular expression to be executed when input changes due to user +   * @param {string=} ngChange Angular expression to be executed when input changes due to user     *    interaction with the input element.     *     * @example @@ -80,19 +80,19 @@ var inputType = {     * Text input with number validation and transformation. Sets the `number` validation     * error if not a valid number.     * -   * @param {string} ng-model Assignable angular expression to data-bind to. +   * @param {string} ngModel Assignable angular expression to data-bind to.     * @param {string=} name Property name of the form under which the control is published.     * @param {string=} min Sets the `min` validation error key if the value entered is less then `min`.     * @param {string=} max Sets the `max` validation error key if the value entered is greater then `min`.     * @param {string=} required Sets `required` validation error key if the value is not entered. -   * @param {number=} ng-minlength Sets `minlength` validation error key if the value is shorter than +   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than     *    minlength. -   * @param {number=} ng-maxlength Sets `maxlength` validation error key if the value is longer than +   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than     *    maxlength. -   * @param {string=} ng-pattern Sets `pattern` validation error key if the value does not match the +   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the     *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for     *    patterns defined as scope expressions. -   * @param {string=} ng-change Angular expression to be executed when input changes due to user +   * @param {string=} ngChange Angular expression to be executed when input changes due to user     *    interaction with the input element.     *     * @example @@ -148,17 +148,17 @@ var inputType = {     * Text input with URL validation. Sets the `url` validation error key if the content is not a     * valid URL.     * -   * @param {string} ng-model Assignable angular expression to data-bind to. +   * @param {string} ngModel Assignable angular expression to data-bind to.     * @param {string=} name Property name of the form under which the control is published.     * @param {string=} required Sets `required` validation error key if the value is not entered. -   * @param {number=} ng-minlength Sets `minlength` validation error key if the value is shorter than +   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than     *    minlength. -   * @param {number=} ng-maxlength Sets `maxlength` validation error key if the value is longer than +   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than     *    maxlength. -   * @param {string=} ng-pattern Sets `pattern` validation error key if the value does not match the +   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the     *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for     *    patterns defined as scope expressions. -   * @param {string=} ng-change Angular expression to be executed when input changes due to user +   * @param {string=} ngChange Angular expression to be executed when input changes due to user     *    interaction with the input element.     *     * @example @@ -213,14 +213,14 @@ var inputType = {     * Text input with email validation. Sets the `email` validation error key if not a valid email     * address.     * -   * @param {string} ng-model Assignable angular expression to data-bind to. +   * @param {string} ngModel Assignable angular expression to data-bind to.     * @param {string=} name Property name of the form under which the control is published.     * @param {string=} required Sets `required` validation error key if the value is not entered. -   * @param {number=} ng-minlength Sets `minlength` validation error key if the value is shorter than +   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than     *    minlength. -   * @param {number=} ng-maxlength Sets `maxlength` validation error key if the value is longer than +   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than     *    maxlength. -   * @param {string=} ng-pattern Sets `pattern` validation error key if the value does not match the +   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the     *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for     *    patterns defined as scope expressions.     * @@ -275,10 +275,10 @@ var inputType = {     * @description     * HTML radio button.     * -   * @param {string} ng-model Assignable angular expression to data-bind to. +   * @param {string} ngModel Assignable angular expression to data-bind to.     * @param {string} value The value to which the expression should be set when selected.     * @param {string=} name Property name of the form under which the control is published. -   * @param {string=} ng-change Angular expression to be executed when input changes due to user +   * @param {string=} ngChange Angular expression to be executed when input changes due to user     *    interaction with the input element.     *     * @example @@ -316,11 +316,11 @@ var inputType = {     * @description     * HTML checkbox.     * -   * @param {string} ng-model Assignable angular expression to data-bind to. +   * @param {string} ngModel Assignable angular expression to data-bind to.     * @param {string=} name Property name of the form under which the control is published. -   * @param {string=} ng-true-value The value to which the expression should be set when selected. -   * @param {string=} ng-false-value The value to which the expression should be set when not selected. -   * @param {string=} ng-change Angular expression to be executed when input changes due to user +   * @param {string=} ngTrueValue The value to which the expression should be set when selected. +   * @param {string=} ngFalseValue The value to which the expression should be set when not selected. +   * @param {string=} ngChange Angular expression to be executed when input changes due to user     *    interaction with the input element.     *     * @example @@ -631,17 +631,17 @@ function checkboxInputType(scope, element, attr, ctrl) {   * properties of this element are exactly the same as those of the   * {@link angular.module.ng.$compileProvider.directive.input input element}.   * - * @param {string} ng-model Assignable angular expression to data-bind to. + * @param {string} ngModel Assignable angular expression to data-bind to.   * @param {string=} name Property name of the form under which the control is published.   * @param {string=} required Sets `required` validation error key if the value is not entered. - * @param {number=} ng-minlength Sets `minlength` validation error key if the value is shorter than + * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than   *    minlength. - * @param {number=} ng-maxlength Sets `maxlength` validation error key if the value is longer than + * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than   *    maxlength. - * @param {string=} ng-pattern Sets `pattern` validation error key if the value does not match the + * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the   *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for   *    patterns defined as scope expressions. - * @param {string=} ng-change Angular expression to be executed when input changes due to user + * @param {string=} ngChange Angular expression to be executed when input changes due to user   *    interaction with the input element.   */ @@ -655,17 +655,17 @@ function checkboxInputType(scope, element, attr, ctrl) {   * HTML input element control with angular data-binding. Input control follows HTML5 input types   * and polyfills the HTML5 validation behavior for older browsers.   * - * @param {string} ng-model Assignable angular expression to data-bind to. + * @param {string} ngModel Assignable angular expression to data-bind to.   * @param {string=} name Property name of the form under which the control is published.   * @param {string=} required Sets `required` validation error key if the value is not entered. - * @param {number=} ng-minlength Sets `minlength` validation error key if the value is shorter than + * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than   *    minlength. - * @param {number=} ng-maxlength Sets `maxlength` validation error key if the value is longer than + * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than   *    maxlength. - * @param {string=} ng-pattern Sets `pattern` validation error key if the value does not match the + * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the   *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for   *    patterns defined as scope expressions. - * @param {string=} ng-change Angular expression to be executed when input changes due to user + * @param {string=} ngChange Angular expression to be executed when input changes due to user   *    interaction with the input element.   *   * @example @@ -760,7 +760,7 @@ var VALID_CLASS = 'ng-valid',  /**   * @ngdoc object - * @name angular.module.ng.$compileProvider.directive.ng-model.NgModelController + * @name angular.module.ng.$compileProvider.directive.ngModel.NgModelController   *   * @property {string} $viewValue Actual string value in the view.   * @property {*} $modelValue The value in the model, that the control is bound to. @@ -813,8 +813,8 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel', '$e    /**     * @ngdoc function -   * @name angular.module.ng.$compileProvider.directive.ng-model.NgModelController#$setValidity -   * @methodOf angular.module.ng.$compileProvider.directive.ng-model.NgModelController +   * @name angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$setValidity +   * @methodOf angular.module.ng.$compileProvider.directive.ngModel.NgModelController     *     * @description     * Change the validity state, and notifies the form when the control changes validity. (i.e. it @@ -855,8 +855,8 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel', '$e    /**     * @ngdoc function -   * @name angular.module.ng.$compileProvider.directive.ng-model.NgModelController#$setViewValue -   * @methodOf angular.module.ng.$compileProvider.directive.ng-model.NgModelController +   * @name angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$setViewValue +   * @methodOf angular.module.ng.$compileProvider.directive.ngModel.NgModelController     *     * @description     * Read a value from view. @@ -925,15 +925,15 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel', '$e  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-model + * @name angular.module.ng.$compileProvider.directive.ngModel   *   * @element input   *   * @description   * Is directive that tells Angular to do two-way data binding. It works together with `input`, - * `select`, `textarea`. You can easily write your own directives to use `ng-model` as well. + * `select`, `textarea`. You can easily write your own directives to use `ngModel` as well.   * - * `ng-model` is responsible for: + * `ngModel` is responsible for:   *   * - binding the view into the model, which other directives such as `input`, `textarea` or `select`   *   require, @@ -942,7 +942,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel', '$e   * - setting related css class onto the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`),   * - register the control with parent {@link angular.module.ng.$compileProvider.directive.form form}.   * - * For basic examples, how to use `ng-model`, see: + * For basic examples, how to use `ngModel`, see:   *   *  - {@link angular.module.ng.$compileProvider.directive.input input}   *    - {@link angular.module.ng.$compileProvider.directive.input.text text} @@ -980,14 +980,14 @@ var ngModelDirective = [function() {  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-change + * @name angular.module.ng.$compileProvider.directive.ngChange   * @restrict E   *   * @description   * Evaluate given expression when user changes the input.   * The expression is not evaluated when the value change is coming from the model.   * - * Note, this directive requires `ng-model` to be present. + * Note, this directive requires `ngModel` to be present.   *   * @element input   * @@ -1065,13 +1065,13 @@ var requiredDirective = [function() {  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-list + * @name angular.module.ng.$compileProvider.directive.ngList   *   * @description   * Text input that converts between comma-seperated string into an array of strings.   *   * @element input - * @param {string=} ng-list optional delimiter that should be used to split the value. If + * @param {string=} ngList optional delimiter that should be used to split the value. If   *   specified in form `/something/` then the value will be converted into a regular expression.   *   * @example diff --git a/src/ng/directive/ngBind.js b/src/ng/directive/ngBind.js index 81541347..3c4a7d43 100644 --- a/src/ng/directive/ngBind.js +++ b/src/ng/directive/ngBind.js @@ -2,19 +2,27 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-bind + * @name angular.module.ng.$compileProvider.directive.ngBind   *   * @description - * The `ng-bind` attribute tells Angular to replace the text content of the specified HTML element + * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element   * with the value of a given expression, and to update the text content when the value of that   * expression changes.   * - * Typically, you don't use `ng-bind` directly, but instead you use the double curly markup like - * `{{ expression }}` and let the Angular compiler transform it to - * `<span ng-bind="expression"></span>` when the template is compiled. + * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like + * `{{ expression }}` which is similar but less verbose. + * + * Once scenario in which the use of `ngBind` is prefered over `{{ expression }}` binding is when + * it's desirable to put bindings into template that is momentarily displayed by the browser in its + * raw state before Angular compiles it. Since `ngBind` is an element attribute, it makes make the + * bindings invisible to the user while the page is loading. + * + * An alternative solution to this problem would be using the + * {@link angular.module.ng.$compileProvider.directive.ngCloak ngCloak} directive. + *   *   * @element ANY - * @param {expression} ng-bind {@link guide/dev_guide.expressions Expression} to evaluate. + * @param {expression} ngBind {@link guide/dev_guide.expressions Expression} to evaluate.   *   * @example   * Enter a name in the Live Preview text box; the greeting below the text box changes instantly. @@ -49,18 +57,18 @@ var ngBindDirective = ngDirective(function(scope, element, attr) {  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-bind-html-unsafe + * @name angular.module.ng.$compileProvider.directive.ngBindHtmlUnsafe   *   * @description   * Creates a binding that will innerHTML the result of evaluating the `expression` into the current   * element. *The innerHTML-ed content will not be sanitized!* You should use this directive only if - * {@link angular.module.ng.$compileProvider.directive.ng-bind-html ng-bind-html} directive is too + * {@link angular.module.ng.$compileProvider.directive.ngBindHtml ngBindHtml} directive is too   * restrictive and when you absolutely trust the source of the content you are binding to.   *   * See {@link angular.module.ng.$sanitize $sanitize} docs for examples.   *   * @element ANY - * @param {expression} ng-bind-html-unsafe {@link guide/dev_guide.expressions Expression} to evaluate. + * @param {expression} ngBindHtmlUnsafe {@link guide/dev_guide.expressions Expression} to evaluate.   */  var ngBindHtmlUnsafeDirective = ngDirective(function(scope, element, attr) {    element.addClass('ng-binding').data('$binding', attr.ngBindHtmlUnsafe); @@ -72,7 +80,7 @@ var ngBindHtmlUnsafeDirective = ngDirective(function(scope, element, attr) {  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-bind-html + * @name angular.module.ng.$compileProvider.directive.ngBindHtml   *   * @description   * Creates a binding that will sanitize the result of evaluating the `expression` with the @@ -82,7 +90,7 @@ var ngBindHtmlUnsafeDirective = ngDirective(function(scope, element, attr) {   * See {@link angular.module.ng.$sanitize $sanitize} docs for examples.   *   * @element ANY - * @param {expression} ng-bind-html {@link guide/dev_guide.expressions Expression} to evaluate. + * @param {expression} ngBindHtml {@link guide/dev_guide.expressions Expression} to evaluate.   */  var ngBindHtmlDirective = ['$sanitize', function($sanitize) {    return function(scope, element, attr) { @@ -98,17 +106,17 @@ var ngBindHtmlDirective = ['$sanitize', function($sanitize) {  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-bind-template + * @name angular.module.ng.$compileProvider.directive.ngBindTemplate   *   * @description - * The `ng-bind-template` attribute specifies that the element - * text should be replaced with the template in ng-bind-template. - * Unlike ng-bind the ng-bind-template can contain multiple `{{` `}}` + * The `ngBindTemplate` directive specifies that the element + * text should be replaced with the template in ngBindTemplate. + * Unlike ngBind the ngBindTemplate can contain multiple `{{` `}}`   * expressions. (This is required since some HTML elements   * can not have SPAN elements such as TITLE, or OPTION to name a few.)   *   * @element ANY - * @param {string} ng-bind-template template of form + * @param {string} ngBindTemplate template of form   *   <tt>{{</tt> <tt>expression</tt> <tt>}}</tt> to eval.   *   * @example diff --git a/src/ng/directive/ngClass.js b/src/ng/directive/ngClass.js index 21b75dd0..1e9a260b 100644 --- a/src/ng/directive/ngClass.js +++ b/src/ng/directive/ngClass.js @@ -19,10 +19,10 @@ function classDirective(name, selector) {  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-class + * @name angular.module.ng.$compileProvider.directive.ngClass   *   * @description - * The `ng-class` allows you to set CSS class on HTML element dynamically by databinding an + * The `ngClass` allows you to set CSS class on HTML element dynamically by databinding an   * expression that represents all classes to be added.   *   * The directive won't add duplicate classes if a particular class was already set. @@ -31,7 +31,7 @@ function classDirective(name, selector) {   * new classes are added.   *   * @element ANY - * @param {expression} ng-class {@link guide/dev_guide.expressions Expression} to eval. The result + * @param {expression} ngClass {@link guide/dev_guide.expressions Expression} to eval. The result   *   of the evaluation can be a string representing space delimited class   *   names, an array, or a map of class names to boolean values.   * @@ -65,18 +65,18 @@ var ngClassDirective = classDirective('', true);  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-class-odd + * @name angular.module.ng.$compileProvider.directive.ngClassOdd   *   * @description - * The `ng-class-odd` and `ng-class-even` works exactly as - * {@link angular.module.ng.$compileProvider.directive.ng-class ng-class}, except it works in conjunction with `ng-repeat` and - * takes affect only on odd (even) rows. + * The `ngClassOdd` and `ngClassEven` directives work exactly as + * {@link angular.module.ng.$compileProvider.directive.ngClass ngClass}, except it works in + * conjunction with `ngRepeat` and takes affect only on odd (even) rows.   *   * This directive can be applied only within a scope of an - * {@link angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat}. + * {@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat}.   *   * @element ANY - * @param {expression} ng-class-odd {@link guide/dev_guide.expressions Expression} to eval. The result + * @param {expression} ngClassOdd {@link guide/dev_guide.expressions Expression} to eval. The result   *   of the evaluation can be a string representing space delimited class names or an array.   *   * @example @@ -105,18 +105,18 @@ var ngClassOddDirective = classDirective('Odd', 0);  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-class-even + * @name angular.module.ng.$compileProvider.directive.ngClassEven   *   * @description - * The `ng-class-odd` and `ng-class-even` works exactly as - * {@link angular.module.ng.$compileProvider.directive.ng-class ng-class}, except it works in - * conjunction with `ng-repeat` and takes affect only on odd (even) rows. + * The `ngClassOdd` and `ngClassEven` works exactly as + * {@link angular.module.ng.$compileProvider.directive.ngClass ngClass}, except it works in + * conjunction with `ngRepeat` and takes affect only on odd (even) rows.   *   * This directive can be applied only within a scope of an - * {@link angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat}. + * {@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat}.   *   * @element ANY - * @param {expression} ng-class-even {@link guide/dev_guide.expressions Expression} to eval. The + * @param {expression} ngClassEven {@link guide/dev_guide.expressions Expression} to eval. The   *   result of the evaluation can be a string representing space delimited class names or an array.   *   * @example diff --git a/src/ng/directive/ngCloak.js b/src/ng/directive/ngCloak.js index 7422e15a..b548193b 100644 --- a/src/ng/directive/ngCloak.js +++ b/src/ng/directive/ngCloak.js @@ -2,28 +2,28 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-cloak + * @name angular.module.ng.$compileProvider.directive.ngCloak   *   * @description - * The `ng-cloak` directive is used to prevent the Angular html template from being briefly + * The `ngCloak` directive is used to prevent the Angular html template from being briefly   * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this   * directive to avoid the undesirable flicker effect caused by the html template display.   *   * The directive can be applied to the `<body>` element, but typically a fine-grained application is   * prefered in order to benefit from progressive rendering of the browser view.   * - * `ng-cloak` works in cooperation with a css rule that is embedded within `angular.js` and + * `ngCloak` works in cooperation with a css rule that is embedded within `angular.js` and   *  `angular.min.js` files. Following is the css rule:   *   * <pre> - * [ng\:cloak], .ng-cloak { + * [ng\:cloak], [ng-cloak], .ng-cloak {   *   display: none;   * }   * </pre>   *   * When this css rule is loaded by the browser, all html elements (including their children) that   * are tagged with the `ng-cloak` directive are hidden. When Angular comes across this directive - * during the compilation of the template it deletes the `ng-cloak` element attribute, which + * during the compilation of the template it deletes the `ngCloak` element attribute, which   * makes the compiled element visible.   *   * For the best result, `angular.js` script must be loaded in the head section of the html file; @@ -32,7 +32,7 @@   *   * Legacy browsers, like IE7, do not provide attribute selector support (added in CSS 2.1) so they   * cannot match the `[ng\:cloak]` selector. To work around this limitation, you must add the css - * class `ng-cloak` in addition to `ng-cloak` directive as shown in the example below. + * class `ngCloak` in addition to `ngCloak` directive as shown in the example below.   *   * @element ANY   * diff --git a/src/ng/directive/ngController.js b/src/ng/directive/ngController.js index 8e2c6f3b..55da78cd 100644 --- a/src/ng/directive/ngController.js +++ b/src/ng/directive/ngController.js @@ -2,17 +2,17 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-controller + * @name angular.module.ng.$compileProvider.directive.ngController   *   * @description - * The `ng-controller` directive assigns behavior to a scope. This is a key aspect of how angular + * The `ngController` directive assigns behavior to a scope. This is a key aspect of how angular   * supports the principles behind the Model-View-Controller design pattern.   *   * MVC components in angular:   *   * * Model — The Model is data in scope properties; scopes are attached to the DOM.   * * View — The template (HTML with data bindings) is rendered into the View. - * * Controller — The `ng-controller` directive specifies a Controller class; the class has + * * Controller — The `ngController` directive specifies a Controller class; the class has   *   methods that typically express the business logic behind the application.   *   * Note that an alternative way to define controllers is via the `{@link angular.module.ng.$route}` @@ -20,7 +20,7 @@   *   * @element ANY   * @scope - * @param {expression} ng-controller Name of a globally accessible constructor function or an + * @param {expression} ngController Name of a globally accessible constructor function or an   *     {@link guide/dev_guide.expressions expression} that on the current scope evaluates to a   *     constructor function.   * diff --git a/src/ng/directive/ngEventDirs.js b/src/ng/directive/ngEventDirs.js index 74028fee..52375920 100644 --- a/src/ng/directive/ngEventDirs.js +++ b/src/ng/directive/ngEventDirs.js @@ -2,14 +2,14 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-click + * @name angular.module.ng.$compileProvider.directive.ngClick   *   * @description - * The ng-click allows you to specify custom behavior when + * The ngClick allows you to specify custom behavior when   * element is clicked.   *   * @element ANY - * @param {expression} ng-click {@link guide/dev_guide.expressions Expression} to evaluate upon + * @param {expression} ngClick {@link guide/dev_guide.expressions Expression} to evaluate upon   * click. (Event object is available as `$event`)   *   * @example @@ -55,118 +55,118 @@ forEach(  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-dblclick + * @name angular.module.ng.$compileProvider.directive.ngDblclick   *   * @description - * The ng-dblclick allows you to specify custom behavior on dblclick event. + * The `ngDblclick` directive allows you to specify custom behavior on dblclick event.   *   * @element ANY - * @param {expression} ng-dblclick {@link guide/dev_guide.expressions Expression} to evaluate upon + * @param {expression} ngDblclick {@link guide/dev_guide.expressions Expression} to evaluate upon   * dblclick. (Event object is available as `$event`)   *   * @example - * See {@link angular.module.ng.$compileProvider.directive.ng-click ng-click} + * See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick}   */  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-mousedown + * @name angular.module.ng.$compileProvider.directive.ngMousedown   *   * @description - * The ng-mousedown allows you to specify custom behavior on mousedown event. + * The ngMousedown directive allows you to specify custom behavior on mousedown event.   *   * @element ANY - * @param {expression} ng-mousedown {@link guide/dev_guide.expressions Expression} to evaluate upon + * @param {expression} ngMousedown {@link guide/dev_guide.expressions Expression} to evaluate upon   * mousedown. (Event object is available as `$event`)   *   * @example - * See {@link angular.module.ng.$compileProvider.directive.ng-click ng-click} + * See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick}   */  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-mouseup + * @name angular.module.ng.$compileProvider.directive.ngMouseup   *   * @description   * Specify custom behavior on mouseup event.   *   * @element ANY - * @param {expression} ng-mouseup {@link guide/dev_guide.expressions Expression} to evaluate upon + * @param {expression} ngMouseup {@link guide/dev_guide.expressions Expression} to evaluate upon   * mouseup. (Event object is available as `$event`)   *   * @example - * See {@link angular.module.ng.$compileProvider.directive.ng-click ng-click} + * See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick}   */  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-mouseover + * @name angular.module.ng.$compileProvider.directive.ngMouseover   *   * @description   * Specify custom behavior on mouseover event.   *   * @element ANY - * @param {expression} ng-mouseover {@link guide/dev_guide.expressions Expression} to evaluate upon + * @param {expression} ngMouseover {@link guide/dev_guide.expressions Expression} to evaluate upon   * mouseover. (Event object is available as `$event`)   *   * @example - * See {@link angular.module.ng.$compileProvider.directive.ng-click ng-click} + * See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick}   */  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-mouseenter + * @name angular.module.ng.$compileProvider.directive.ngMouseenter   *   * @description   * Specify custom behavior on mouseenter event.   *   * @element ANY - * @param {expression} ng-mouseenter {@link guide/dev_guide.expressions Expression} to evaluate upon + * @param {expression} ngMouseenter {@link guide/dev_guide.expressions Expression} to evaluate upon   * mouseenter. (Event object is available as `$event`)   *   * @example - * See {@link angular.module.ng.$compileProvider.directive.ng-click ng-click} + * See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick}   */  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-mouseleave + * @name angular.module.ng.$compileProvider.directive.ngMouseleave   *   * @description   * Specify custom behavior on mouseleave event.   *   * @element ANY - * @param {expression} ng-mouseleave {@link guide/dev_guide.expressions Expression} to evaluate upon + * @param {expression} ngMouseleave {@link guide/dev_guide.expressions Expression} to evaluate upon   * mouseleave. (Event object is available as `$event`)   *   * @example - * See {@link angular.module.ng.$compileProvider.directive.ng-click ng-click} + * See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick}   */  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-mousemove + * @name angular.module.ng.$compileProvider.directive.ngMousemove   *   * @description   * Specify custom behavior on mousemove event.   *   * @element ANY - * @param {expression} ng-mousemove {@link guide/dev_guide.expressions Expression} to evaluate upon + * @param {expression} ngMousemove {@link guide/dev_guide.expressions Expression} to evaluate upon   * mousemove. (Event object is available as `$event`)   *   * @example - * See {@link angular.module.ng.$compileProvider.directive.ng-click ng-click} + * See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick}   */  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-submit + * @name angular.module.ng.$compileProvider.directive.ngSubmit   *   * @description   * Enables binding angular expressions to onsubmit events. @@ -175,7 +175,7 @@ forEach(   * server and reloading the current page).   *   * @element form - * @param {expression} ng-submit {@link guide/dev_guide.expressions Expression} to eval. + * @param {expression} ngSubmit {@link guide/dev_guide.expressions Expression} to eval.   *   * @example     <doc:example> diff --git a/src/ng/directive/ngInclude.js b/src/ng/directive/ngInclude.js index 6a656cb6..13a090a4 100644 --- a/src/ng/directive/ngInclude.js +++ b/src/ng/directive/ngInclude.js @@ -2,22 +2,23 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-include + * @name angular.module.ng.$compileProvider.directive.ngInclude   * @restrict ECA   *   * @description   * Fetches, compiles and includes an external HTML fragment.   *   * Keep in mind that Same Origin Policy applies to included resources - * (e.g. ng-include won't work for file:// access). + * (e.g. ngInclude won't work for cross-domain requests on all browsers and for + *  file:// access on some browsers).   *   * @scope   * - * @param {string} ng-include|src angular expression evaluating to URL. If the source is a string constant, + * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,   *                 make sure you wrap it in quotes, e.g. `src="'myPartialTemplate.html'"`.   * @param {string=} onload Expression to evaluate when a new partial is loaded.   * - * @param {string=} autoscroll Whether `ng-include` should call {@link angular.module.ng.$anchorScroll + * @param {string=} autoscroll Whether `ngInclude` should call {@link angular.module.ng.$anchorScroll   *                  $anchorScroll} to scroll the viewport after the content is loaded.   *   *                  - If the attribute is not set, disable scrolling. @@ -65,11 +66,11 @@  /**   * @ngdoc event - * @name angular.module.ng.$compileProvider.directive.ng-include#$includeContentLoaded - * @eventOf angular.module.ng.$compileProvider.directive.ng-include - * @eventType emit on the current ng-include scope + * @name angular.module.ng.$compileProvider.directive.ngInclude#$includeContentLoaded + * @eventOf angular.module.ng.$compileProvider.directive.ngInclude + * @eventType emit on the current ngInclude scope   * @description - * Emitted every time the ng-include content is reloaded. + * Emitted every time the ngInclude content is reloaded.   */  var ngIncludeDirective = ['$http', '$templateCache', '$anchorScroll', '$compile',                    function($http,   $templateCache,   $anchorScroll,   $compile) { diff --git a/src/ng/directive/ngInit.js b/src/ng/directive/ngInit.js index cbd1b3ed..1fc1c96a 100644 --- a/src/ng/directive/ngInit.js +++ b/src/ng/directive/ngInit.js @@ -2,14 +2,14 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-init + * @name angular.module.ng.$compileProvider.directive.ngInit   *   * @description - * The `ng-init` attribute specifies initialization tasks to be executed + * The `ngInit` directive specifies initialization tasks to be executed   *  before the template enters execution mode during bootstrap.   *   * @element ANY - * @param {expression} ng-init {@link guide/dev_guide.expressions Expression} to eval. + * @param {expression} ngInit {@link guide/dev_guide.expressions Expression} to eval.   *   * @example     <doc:example> diff --git a/src/ng/directive/ngNonBindable.js b/src/ng/directive/ngNonBindable.js index 2e9faa5a..6165c6f6 100644 --- a/src/ng/directive/ngNonBindable.js +++ b/src/ng/directive/ngNonBindable.js @@ -2,18 +2,18 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-non-bindable + * @name angular.module.ng.$compileProvider.directive.ngNonBindable   * @priority 1000   *   * @description   * Sometimes it is necessary to write code which looks like bindings but which should be left alone - * by angular. Use `ng-non-bindable` to make angular ignore a chunk of HTML. + * by angular. Use `ngNonBindable` to make angular ignore a chunk of HTML.   *   * @element ANY   *   * @example   * In this example there are two location where a simple binding (`{{}}`) is present, but the one - * wrapped in `ng-non-bindable` is left alone. + * wrapped in `ngNonBindable` is left alone.   *   * @example      <doc:example> diff --git a/src/ng/directive/ngPluralize.js b/src/ng/directive/ngPluralize.js index a8cc40a6..ec5b24f4 100644 --- a/src/ng/directive/ngPluralize.js +++ b/src/ng/directive/ngPluralize.js @@ -2,15 +2,15 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-pluralize + * @name angular.module.ng.$compileProvider.directive.ngPluralize   * @restrict EA   *   * @description   * # Overview - * ng-pluralize is a directive that displays messages according to en-US localization rules. + * `ngPluralize` is a directive that displays messages according to en-US localization rules.   * These rules are bundled with angular.js and the rules can be overridden - * (see {@link guide/dev_guide.i18n Angular i18n} dev guide). You configure ng-pluralize by - * specifying the mappings between + * (see {@link guide/dev_guide.i18n Angular i18n} dev guide). You configure ngPluralize directive + * by specifying the mappings between   * {@link http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html   * plural categories} and the strings to be displayed.   * @@ -24,8 +24,8 @@   * explicit number rule for "3" matches the number 3. You will see the use of plural categories   * and explicit number rules throughout later parts of this documentation.   * - * # Configuring ng-pluralize - * You configure ng-pluralize by providing 2 attributes: `count` and `when`. + * # Configuring ngPluralize + * You configure ngPluralize by providing 2 attributes: `count` and `when`.   * You can also provide an optional attribute, `offset`.   *   * The value of the `count` attribute can be either a string or an {@link guide/dev_guide.expressions @@ -35,7 +35,7 @@   * string to be displayed. The value of the attribute should be a JSON object so that Angular   * can interpret it correctly.   * - * The following example shows how to configure ng-pluralize: + * The following example shows how to configure ngPluralize:   *   * <pre>   * <ng-pluralize count="personCount" @@ -56,7 +56,7 @@   * <span ng-non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder   * for <span ng-non-bindable>{{numberExpression}}</span>.   * - * # Configuring ng-pluralize with offset + * # Configuring ngPluralize with offset   * The `offset` attribute allows further customization of pluralized text, which can result in   * a better user experience. For example, instead of the message "4 people are viewing this document",   * you might display "John, Kate and 2 others are viewing this document". diff --git a/src/ng/directive/ngRepeat.js b/src/ng/directive/ngRepeat.js index 82f8b9c7..66464c1b 100644 --- a/src/ng/directive/ngRepeat.js +++ b/src/ng/directive/ngRepeat.js @@ -2,10 +2,10 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-repeat + * @name angular.module.ng.$compileProvider.directive.ngRepeat   *   * @description - * The `ng-repeat` directive instantiates a template once per item from a collection. Each template + * The `ngRepeat` directive instantiates a template once per item from a collection. Each template   * instance gets its own scope, where the given loop variable is set to the current collection item,   * and `$index` is set to the item index or key.   * @@ -21,7 +21,7 @@   * @element ANY   * @scope   * @priority 1000 - * @param {repeat_expression} ng-repeat The expression indicating how to enumerate a collection. Two + * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. Two   *   formats are currently supported:   *   *   * `variable in expression` – where variable is the user defined loop variable and `expression` @@ -36,7 +36,7 @@   *   * @example   * This example initializes the scope to a list of names and - * then uses `ng-repeat` to display every person: + * then uses `ngRepeat` to display every person:      <doc:example>        <doc:source>          <div ng-init="friends = [{name:'John', age:25}, {name:'Mary', age:28}]"> @@ -68,7 +68,7 @@ var ngRepeatDirective = ngDirective({        var match = expression.match(/^\s*(.+)\s+in\s+(.*)\s*$/),          lhs, rhs, valueIdent, keyIdent;        if (! match) { -        throw Error("Expected ng-repeat in form of '_item_ in _collection_' but got '" + +        throw Error("Expected ngRepeat in form of '_item_ in _collection_' but got '" +            expression + "'.");        }        lhs = match[1]; diff --git a/src/ng/directive/ngShowHide.js b/src/ng/directive/ngShowHide.js index 40a8a68e..df6bc243 100644 --- a/src/ng/directive/ngShowHide.js +++ b/src/ng/directive/ngShowHide.js @@ -2,14 +2,14 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-show + * @name angular.module.ng.$compileProvider.directive.ngShow   *   * @description - * The `ng-show` and `ng-hide` directives show or hide a portion of the DOM tree (HTML) + * The `ngShow` and `ngHide` directives show or hide a portion of the DOM tree (HTML)   * conditionally.   *   * @element ANY - * @param {expression} ng-show If the {@link guide/dev_guide.expressions expression} is truthy + * @param {expression} ngShow If the {@link guide/dev_guide.expressions expression} is truthy   *     then the element is shown or hidden respectively.   *   * @example @@ -42,14 +42,14 @@ var ngShowDirective = ngDirective(function(scope, element, attr){  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-hide + * @name angular.module.ng.$compileProvider.directive.ngHide   *   * @description - * The `ng-hide` and `ng-show` directives hide or show a portion + * The `ngHide` and `ngShow` directives hide or show a portion   * of the HTML conditionally.   *   * @element ANY - * @param {expression} ng-hide If the {@link guide/dev_guide.expressions expression} truthy then + * @param {expression} ngHide If the {@link guide/dev_guide.expressions expression} truthy then   *     the element is shown or hidden respectively.   *   * @example diff --git a/src/ng/directive/ngStyle.js b/src/ng/directive/ngStyle.js index 8a4e7458..c24c1b6d 100644 --- a/src/ng/directive/ngStyle.js +++ b/src/ng/directive/ngStyle.js @@ -2,13 +2,13 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-style + * @name angular.module.ng.$compileProvider.directive.ngStyle   *   * @description - * The ng-style allows you to set CSS style on an HTML element conditionally. + * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.   *   * @element ANY - * @param {expression} ng-style {@link guide/dev_guide.expressions Expression} which evals to an + * @param {expression} ngStyle {@link guide/dev_guide.expressions Expression} which evals to an   *      object whose keys are CSS style names and values are corresponding values for those CSS   *      keys.   * diff --git a/src/ng/directive/ngSwitch.js b/src/ng/directive/ngSwitch.js index 16b0c4d4..52b501a6 100644 --- a/src/ng/directive/ngSwitch.js +++ b/src/ng/directive/ngSwitch.js @@ -2,26 +2,26 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-switch + * @name angular.module.ng.$compileProvider.directive.ngSwitch   * @restrict EA   *   * @description   * Conditionally change the DOM structure.   *   * @usageContent - * <any ng-switch-when="matchValue1">...</any> - *   <any ng-switch-when="matchValue2">...</any> + * <ANY ng-switch-when="matchValue1">...</ANY> + *   <ANY ng-switch-when="matchValue2">...</ANY>   *   ... - *   <any ng-switch-default>...</any> + *   <ANY ng-switch-default>...</ANY>   *   * @scope - * @param {*} ng-switch|on expression to match against <tt>ng-switch-when</tt>. + * @param {*} ngSwitch|on expression to match against <tt>ng-switch-when</tt>.   * @paramDescription   * On child elments add:   * - * * `ng-switch-when`: the case statement to match against. If match then this + * * `ngSwitchWhen`: the case statement to match against. If match then this   *   case will be displayed. - * * `ng-switch-default`: the default case when no other casses match. + * * `ngSwitchDefault`: the default case when no other casses match.   *   * @example      <doc:example> diff --git a/src/ng/directive/ngTransclude.js b/src/ng/directive/ngTransclude.js index ab4011f0..aab61640 100644 --- a/src/ng/directive/ngTransclude.js +++ b/src/ng/directive/ngTransclude.js @@ -2,7 +2,7 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-transclude + * @name angular.module.ng.$compileProvider.directive.ngTransclude   *   * @description   * Insert the transcluded DOM here. diff --git a/src/ng/directive/ngView.js b/src/ng/directive/ngView.js index b305af0b..4f6a70ba 100644 --- a/src/ng/directive/ngView.js +++ b/src/ng/directive/ngView.js @@ -2,12 +2,12 @@  /**   * @ngdoc directive - * @name angular.module.ng.$compileProvider.directive.ng-view + * @name angular.module.ng.$compileProvider.directive.ngView   * @restrict ECA   *   * @description   * # Overview - * `ng-view` is a directive that complements the {@link angular.module.ng.$route $route} service by + * `ngView` is a directive that complements the {@link angular.module.ng.$route $route} service by   * including the rendered template of the current route into the main layout (`index.html`) file.   * Every time the current route changes, the included view changes with it according to the   * configuration of the `$route` service. @@ -97,11 +97,11 @@  /**   * @ngdoc event - * @name angular.module.ng.$compileProvider.directive.ng-view#$viewContentLoaded - * @eventOf angular.module.ng.$compileProvider.directive.ng-view - * @eventType emit on the current ng-view scope + * @name angular.module.ng.$compileProvider.directive.ngView#$viewContentLoaded + * @eventOf angular.module.ng.$compileProvider.directive.ngView + * @eventType emit on the current ngView scope   * @description - * Emitted every time the ng-view content is reloaded. + * Emitted every time the ngView content is reloaded.   */  var ngViewDirective = ['$http', '$templateCache', '$route', '$anchorScroll', '$compile',                         '$controller', diff --git a/src/ng/directive/script.js b/src/ng/directive/script.js index 4090ae24..dcbd97b1 100644 --- a/src/ng/directive/script.js +++ b/src/ng/directive/script.js @@ -6,7 +6,7 @@   *   * @description   * Load content of a script tag, with type `text/ng-template`, into `$templateCache`, so that the - * template can be used by `ng-include`, `ng-view` or directive templates. + * template can be used by `ngInclude`, `ngView` or directive templates.   *   * @restrict E   * @param {'text/ng-template'} type must be set to `'text/ng-template'` diff --git a/src/ng/directive/select.js b/src/ng/directive/select.js index b70339fc..384b312e 100644 --- a/src/ng/directive/select.js +++ b/src/ng/directive/select.js @@ -8,34 +8,34 @@   * @description   * HTML `SELECT` element with angular data-binding.   * - * # `ng-options` + * # `ngOptions`   * - * Optionally `ng-options` attribute can be used to dynamically generate a list of `<option>` + * Optionally `ngOptions` attribute can be used to dynamically generate a list of `<option>`   * elements for a `<select>` element using an array or an object obtained by evaluating the - * `ng-options` expression. + * `ngOptions` expression.   *˝˝   * When an item in the select menu is select, the value of array element or object property - * represented by the selected option will be bound to the model identified by the `ng-model` attribute - * of the parent select element. + * represented by the selected option will be bound to the model identified by the `ngModel` + * directive of the parent select element.   *   * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can   * be nested into the `<select>` element. This element will then represent `null` or "not selected"   * option. See example below for demonstration.   * - * Note: `ng-options` provides iterator facility for `<option>` element which must be used instead - * of {@link angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat}. `ng-repeat` is not suitable for use with - * `<option>` element because of the following reasons: + * Note: `ngOptions` provides iterator facility for `<option>` element which must be used instead + * of {@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat}. `ngRepeat` is not + * suitable for use with `<option>` element because of the following reasons:   *   *   * value attribute of the option element that we need to bind to requires a string, but the   *     source of data for the iteration might be in a form of array containing objects instead of   *     strings - *   * {@link angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} unrolls after the select binds causing - *     incorect rendering on most browsers. + *   * {@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} unrolls after the +  *    select binds causing incorect rendering on most browsers.   *   * binding to a value not in list confuses most browsers.   *   * @param {string} name assignable expression to data-bind to.   * @param {string=} required The control is considered valid only if value is entered. - * @param {comprehension_expression=} ng-options in one of the following forms: + * @param {comprehension_expression=} ngOptions in one of the following forms:   *   *   * for array data sources:   *     * `label` **`for`** `value` **`in`** `array` @@ -182,7 +182,7 @@ var selectDirective = ['$compile', '$parse', function($compile,   $parse) {            });          }; -        // we have to do it on each watch since ng-model watches reference, but +        // we have to do it on each watch since ngModel watches reference, but          // we need to work of an array, so we need to see if anything was inserted/removed          scope.$watch(function() {            if (!equals(lastView, ctrl.$viewValue)) { @@ -209,7 +209,7 @@ var selectDirective = ['$compile', '$parse', function($compile,   $parse) {          if (! (match = optionsExp.match(NG_OPTIONS_REGEXP))) {            throw Error( -            "Expected ng-options in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_'" + +            "Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_'" +              " but got '" + optionsExp + "'.");          } diff --git a/src/ng/filter/filters.js b/src/ng/filter/filters.js index d6efc418..f5e96bbf 100644 --- a/src/ng/filter/filters.js +++ b/src/ng/filter/filters.js @@ -398,7 +398,6 @@ function dateFilter($locale) {   * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.   * @returns {string} JSON string.   * - * @css ng-monospace Always applied to the encapsulating element.   *   * @example:     <doc:example> diff --git a/src/ng/rootScope.js b/src/ng/rootScope.js index 4cf6a3e0..08f8a428 100644 --- a/src/ng/rootScope.js +++ b/src/ng/rootScope.js @@ -328,7 +328,7 @@ function $RootScopeProvider(){         * `'Maximum iteration limit exceeded.'` if the number of iterations exceeds 100.         *         * Usually you don't call `$digest()` directly in -       * {@link angular.module.ng.$compileProvider.directive.ng-controller controllers} or in +       * {@link angular.module.ng.$compileProvider.directive.ngController controllers} or in         * {@link angular.module.ng.$compileProvider.directive directives}.         * Instead a call to {@link angular.module.ng.$rootScope.Scope#$apply $apply()} (typically from within a         * {@link angular.module.ng.$compileProvider.directive directives}) will force a `$digest()`. @@ -461,7 +461,7 @@ function $RootScopeProvider(){         * scope is eligible for garbage collection.         *         * The `$destroy()` is usually used by directives such as -       * {@link angular.module.ng.$compileProvider.directive.ng-repeat ng-repeat} for managing the +       * {@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} for managing the         * unrolling of the loop.         *         * Just before a scope is destroyed a `$destroy` event is broadcasted on this scope. diff --git a/src/ng/route.js b/src/ng/route.js index 864cb0ee..fe726b88 100644 --- a/src/ng/route.js +++ b/src/ng/route.js @@ -30,8 +30,8 @@ function $RouteProvider(){     *    - `controller` – `{function()=}` – Controller fn that should be associated with newly     *      created scope.     *    - `template` – `{string=}` – path to an html template that should be used by -   *      {@link angular.module.ng.$compileProvider.directive.ng-view ng-view} or -   *      {@link angular.module.ng.$compileProvider.directive.ng-include ng-include} directives. +   *      {@link angular.module.ng.$compileProvider.directive.ngView ngView} or +   *      {@link angular.module.ng.$compileProvider.directive.ngInclude ngInclude} directives.     *    - `redirectTo` – {(string|function())=} – value to update     *      {@link angular.module.ng.$location $location} path with and trigger route redirection.     * @@ -107,12 +107,12 @@ function $RouteProvider(){       *       * You can define routes through {@link angular.module.ng.$routeProvider $routeProvider}'s API.       * -     * The `$route` service is typically used in conjunction with {@link angular.module.ng.$compileProvider.directive.ng-view ng-view} +     * The `$route` service is typically used in conjunction with {@link angular.module.ng.$compileProvider.directive.ngView ngView}       * directive and the {@link angular.module.ng.$routeParams $routeParams} service.       *       * @example         This example shows how changing the URL hash causes the `$route` to match a route against the -       URL, and the `ng-view` pulls in the partial. +       URL, and the `ngView` pulls in the partial.         Note that this example is using {@link angular.module.ng.$compileProvider.directive.script inlined templates}         to get it working on jsfiddle as well. @@ -241,7 +241,7 @@ function $RouteProvider(){             * Causes `$route` service to reload the current route even if             * {@link angular.module.ng.$location $location} hasn't changed.             * -           * As a result of that, {@link angular.module.ng.$compileProvider.directive.ng-view ng-view} +           * As a result of that, {@link angular.module.ng.$compileProvider.directive.ngView ngView}             * creates new scope, reinstantiates the controller.             */            reload: function() { diff --git a/test/ng/directive/ngRepeatSpec.js b/test/ng/directive/ngRepeatSpec.js index 85aa1511..4195ef83 100644 --- a/test/ng/directive/ngRepeatSpec.js +++ b/test/ng/directive/ngRepeatSpec.js @@ -67,7 +67,7 @@ describe('ng-repeat', function() {    it('should error on wrong parsing of ng-repeat', inject(function($rootScope, $compile) {      expect(function() {        element = $compile('<ul><li ng-repeat="i dont parse"></li></ul>')($rootScope); -    }).toThrow("Expected ng-repeat in form of '_item_ in _collection_' but got 'i dont parse'."); +    }).toThrow("Expected ngRepeat in form of '_item_ in _collection_' but got 'i dont parse'.");    })); diff --git a/test/ng/directive/selectSpec.js b/test/ng/directive/selectSpec.js index 2e3cfaaf..9518d988 100644 --- a/test/ng/directive/selectSpec.js +++ b/test/ng/directive/selectSpec.js @@ -181,7 +181,7 @@ describe('select', function() {      it('should throw when not formated "? for ? in ?"', function() {        expect(function() {          compile('<select ng-model="selected" ng-options="i dont parse"></select>'); -      }).toThrow("Expected ng-options in form of '_select_ (as _label_)? for (_key_,)?_value_ in" + +      }).toThrow("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in" +                   " _collection_' but got 'i dont parse'.");      }); | 
