mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
docs(ngBind): clarify some of the writing
This commit is contained in:
parent
9d27b0af4c
commit
2adad3ab81
1 changed files with 8 additions and 8 deletions
|
|
@ -12,10 +12,9 @@
|
|||
* Typically, you don't use `ngBind` directly, but instead you use the double curly markup like
|
||||
* `{{ expression }}` which is similar but less verbose.
|
||||
*
|
||||
* One scenario in which the use of `ngBind` is preferred 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 the
|
||||
* bindings invisible to the user while the page is loading.
|
||||
* It is preferrable to use `ngBind` instead of `{{ expression }}` when a template is momentarily
|
||||
* displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an
|
||||
* element attribute, it makes the bindings invisible to the user while the page is loading.
|
||||
*
|
||||
* An alternative solution to this problem would be using the
|
||||
* {@link ng.directive:ngCloak ngCloak} directive.
|
||||
|
|
@ -61,10 +60,11 @@ var ngBindDirective = ngDirective(function(scope, element, attr) {
|
|||
*
|
||||
* @description
|
||||
* 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.)
|
||||
* text content should be replaced with the interpolation of the template
|
||||
* in the `ngBindTemplate` attribute.
|
||||
* Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`
|
||||
* expressions. This directive is needed since some HTML elements
|
||||
* (such as TITLE and OPTION) cannot contain SPAN elements.
|
||||
*
|
||||
* @element ANY
|
||||
* @param {string} ngBindTemplate template of form
|
||||
|
|
|
|||
Loading…
Reference in a new issue