|
10 | 10 | * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this
|
11 | 11 | * directive to avoid the undesirable flicker effect caused by the html template display.
|
12 | 12 | *
|
13 |
| - * The directive can be applied to the `<body>` element, but typically a fine-grained application is |
14 |
| - * preferred in order to benefit from progressive rendering of the browser view. |
| 13 | + * The directive can be applied to the `<body>` element, but the preferred usage is to apply |
| 14 | + * multiple `ngCloak` directives to small portions of the page to permit progressive rendering |
| 15 | + * of the browser view. |
15 | 16 | *
|
16 |
| - * `ngCloak` works in cooperation with a css rule that is embedded within `angular.js` and |
17 |
| - * `angular.min.js` files. Following is the css rule: |
| 17 | + * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and |
| 18 | + * `angular.min.js`: |
18 | 19 | *
|
19 | 20 | * <pre>
|
20 | 21 | * [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
|
|
23 | 24 | * </pre>
|
24 | 25 | *
|
25 | 26 | * When this css rule is loaded by the browser, all html elements (including their children) that
|
26 |
| - * are tagged with the `ng-cloak` directive are hidden. When Angular comes across this directive |
27 |
| - * during the compilation of the template it deletes the `ngCloak` element attribute, which |
28 |
| - * makes the compiled element visible. |
| 27 | + * are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive |
| 28 | + * during the compilation of the template it deletes the `ngCloak` element attribute, making |
| 29 | + * the compiled element visible. |
29 | 30 | *
|
30 |
| - * For the best result, `angular.js` script must be loaded in the head section of the html file; |
31 |
| - * alternatively, the css rule (above) must be included in the external stylesheet of the |
| 31 | + * For the best result, the `angular.js` script must be loaded in the head section of the html |
| 32 | + * document; alternatively, the css rule above must be included in the external stylesheet of the |
32 | 33 | * application.
|
33 | 34 | *
|
34 | 35 | * Legacy browsers, like IE7, do not provide attribute selector support (added in CSS 2.1) so they
|
35 | 36 | * cannot match the `[ng\:cloak]` selector. To work around this limitation, you must add the css
|
36 |
| - * class `ngCloak` in addition to `ngCloak` directive as shown in the example below. |
| 37 | + * class `ngCloak` in addition to the `ngCloak` directive as shown in the example below. |
37 | 38 | *
|
38 | 39 | * @element ANY
|
39 | 40 | *
|
|
0 commit comments