Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: third_party/pkg/angular/lib/directive/ng_bind.dart

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 part of angular.directive; 1 part of angular.directive;
2 2
3 /** 3 /**
4 * The ngBind attribute tells Angular to replace the text content of the 4 * The ngBind attribute tells Angular to replace the text content of the
5 * specified HTML element with the value of a given expression, and to update 5 * specified HTML element with the value of a given expression, and to update
6 * the text content when the value of that expression changes. 6 * the text content when the value of that expression changes.
7 * 7 *
8 * Typically, you don't use ngBind directly, but instead you use the double 8 * Typically, you don't use ngBind directly, but instead you use the double
9 * curly markup like {{ expression }} which is similar but less verbose. 9 * curly markup like {{ expression }} which is similar but less verbose.
10 * 10 *
11 * It is preferrable to use ngBind instead of {{ expression }} when a template 11 * It is preferrable to use ngBind instead of {{ expression }} when a template
12 * is momentarily displayed by the browser in its raw state before Angular 12 * is momentarily displayed by the browser in its raw state before Angular
13 * compiles it. Since ngBind is an element attribute, it makes the bindings 13 * compiles it. Since ngBind is an element attribute, it makes the bindings
14 * invisible to the user while the page is loading. 14 * invisible to the user while the page is loading.
15 * 15 *
16 * An alternative solution to this problem would be using the ngCloak directive. 16 * An alternative solution to this problem would be using the ngCloak directive.
17 */ 17 */
18 @NgDirective( 18 @Decorator(
19 selector: '[ng-bind]', 19 selector: '[ng-bind]',
20 map: const {'ng-bind': '=>value'}) 20 map: const {'ng-bind': '=>value'})
21 class NgBindDirective { 21 class NgBind {
22 final dom.Element element; 22 final dom.Element element;
23 23
24 NgBindDirective(this.element); 24 NgBind(this.element);
25 25
26 set value(value) => element.text = value == null ? '' : value.toString(); 26 set value(value) => element.text = value == null ? '' : value.toString();
27 } 27 }
OLDNEW
« no previous file with comments | « third_party/pkg/angular/lib/directive/ng_base_css.dart ('k') | third_party/pkg/angular/lib/directive/ng_bind_html.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698