| Index: third_party/pkg/angular/lib/directive/ng_bind.dart
|
| diff --git a/third_party/pkg/angular/lib/directive/ng_bind.dart b/third_party/pkg/angular/lib/directive/ng_bind.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..19335a854e20101b273669e93c7ad307fdfdb7b7
|
| --- /dev/null
|
| +++ b/third_party/pkg/angular/lib/directive/ng_bind.dart
|
| @@ -0,0 +1,27 @@
|
| +part of angular.directive;
|
| +
|
| +/**
|
| + * The ngBind attribute tells Angular to replace the text content of the
|
| + * specified HTML element with the value of a given expression, and to update
|
| + * the text content when the value of that expression changes.
|
| + *
|
| + * Typically, you don't use ngBind directly, but instead you use the double
|
| + * curly markup like {{ expression }} which is similar but less verbose.
|
| + *
|
| + * 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 ngCloak directive.
|
| + */
|
| +@NgDirective(
|
| + selector: '[ng-bind]',
|
| + map: const {'ng-bind': '=>value'})
|
| +class NgBindDirective {
|
| + dom.Element element;
|
| +
|
| + NgBindDirective(this.element);
|
| +
|
| + set value(value) => element.text = value == null ? '' : value.toString();
|
| +}
|
|
|