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

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

Issue 124053002: Adding Angular and dependent packages for testing (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
(Empty)
1 part of angular.directive;
2
3 /**
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
6 * the text content when the value of that expression changes.
7 *
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.
10 *
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
13 * compiles it. Since ngBind is an element attribute, it makes the bindings
14 * invisible to the user while the page is loading.
15 *
16 * An alternative solution to this problem would be using the ngCloak directive.
17 */
18 @NgDirective(
19 selector: '[ng-bind]',
20 map: const {'ng-bind': '=>value'})
21 class NgBindDirective {
22 dom.Element element;
23
24 NgBindDirective(this.element);
25
26 set value(value) => element.text = value == null ? '' : value.toString();
27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698