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

Unified Diff: third_party/pkg/angular/lib/directive/ng_bind_html.dart

Issue 180843004: Revert revision 33053 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/angular/lib/directive/ng_bind_html.dart
===================================================================
--- third_party/pkg/angular/lib/directive/ng_bind_html.dart (revision 33054)
+++ third_party/pkg/angular/lib/directive/ng_bind_html.dart (working copy)
@@ -16,18 +16,21 @@
*/
@NgDirective(
selector: '[ng-bind-html]',
- map: const {'ng-bind-html': '=>value'})
+ map: const {'ngBindHtml': '=>value'})
class NgBindHtmlDirective {
- final dom.Element element;
- final dom.NodeValidator validator;
-
- NgBindHtmlDirective(this.element, dom.NodeValidator this.validator);
+ // The default HTML sanitizer. Eventually, we'll make this configurable or
+ // use an optionally loaded `$sanitize` service.
+ static final dom.NodeValidator validator = new dom.NodeValidatorBuilder.common();
+ dom.Element element;
+
+ NgBindHtmlDirective(this.element);
+
/**
* Parsed expression from the `ng-bind-html` attribute.  The result of this
* expression is innerHTML'd according to the rules specified in this class'
- * documentation.
+ * documention.
*/
- set value(value) => element.setInnerHtml(value == null ? '' : value.toString(),
- validator: validator);
+ set value(value) => element.setInnerHtml((value == null ? '' : value.toString()),
+ validator: validator) ;
}
« no previous file with comments | « third_party/pkg/angular/lib/directive/ng_bind.dart ('k') | third_party/pkg/angular/lib/directive/ng_bind_template.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698