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

Unified Diff: third_party/pkg/angular/lib/core_dom/common.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, 12 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/core_dom/common.dart
diff --git a/third_party/pkg/angular/lib/core_dom/common.dart b/third_party/pkg/angular/lib/core_dom/common.dart
new file mode 100644
index 0000000000000000000000000000000000000000..e87d803389c33859a8bf3c0485ca3745cccb9af9
--- /dev/null
+++ b/third_party/pkg/angular/lib/core_dom/common.dart
@@ -0,0 +1,29 @@
+part of angular.core.dom;
+
+List<dom.Node> cloneElements(elements) {
+ var clones = [];
+ for(var i = 0, ii = elements.length; i < ii; i++) {
+ clones.add(elements[i].clone(true));
+ }
+ return clones;
+}
+
+typedef ApplyMapping(NodeAttrs attrs, Scope scope, Object dst);
+
+class DirectiveRef {
+ final dom.Node element;
+ final Type type;
+ final NgAnnotation annotation;
+ final String value;
+ final List<ApplyMapping> mappings = new List<ApplyMapping>();
+
+ BlockFactory blockFactory;
+
+ DirectiveRef(this.element, this.type, this.annotation, [ this.value ]);
+
+ String toString() {
+ var html = element is dom.Element ? (element as dom.Element).outerHtml : element.nodeValue;
+ return '{ element: $html, selector: ${annotation.selector}, value: $value }';
+ }
+}
+

Powered by Google App Engine
This is Rietveld 408576698