Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 2adad3a

Browse files
ndppetebacondarwin
authored andcommitted
docs(ngBind): clarify some of the writing
1 parent 9d27b0a commit 2adad3a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/ng/directive/ngBind.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212
* Typically, you don't use `ngBind` directly, but instead you use the double curly markup like
1313
* `{{ expression }}` which is similar but less verbose.
1414
*
15-
* One scenario in which the use of `ngBind` is preferred over `{{ expression }}` binding is when
16-
* it's desirable to put bindings into template that is momentarily displayed by the browser in its
17-
* raw state before Angular compiles it. Since `ngBind` is an element attribute, it makes the
18-
* bindings invisible to the user while the page is loading.
15+
* It is preferrable to use `ngBind` instead of `{{ expression }}` when a template is momentarily
16+
* displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an
17+
* element attribute, it makes the bindings invisible to the user while the page is loading.
1918
*
2019
* An alternative solution to this problem would be using the
2120
* {@link ng.directive:ngCloak ngCloak} directive.
@@ -61,10 +60,11 @@ var ngBindDirective = ngDirective(function(scope, element, attr) {
6160
*
6261
* @description
6362
* The `ngBindTemplate` directive specifies that the element
64-
* text should be replaced with the template in ngBindTemplate.
65-
* Unlike ngBind the ngBindTemplate can contain multiple `{{` `}}`
66-
* expressions. (This is required since some HTML elements
67-
* can not have SPAN elements such as TITLE, or OPTION to name a few.)
63+
* text content should be replaced with the interpolation of the template
64+
* in the `ngBindTemplate` attribute.
65+
* Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`
66+
* expressions. This directive is needed since some HTML elements
67+
* (such as TITLE and OPTION) cannot contain SPAN elements.
6868
*
6969
* @element ANY
7070
* @param {string} ngBindTemplate template of form

0 commit comments

Comments
 (0)