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

Unified Diff: utils/tests/template/test_list.dart

Issue 9695048: Template parser (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Siggi's comments Created 8 years, 9 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
« no previous file with comments | « utils/tests/template/test_complex2.dart ('k') | utils/tests/template/test_simple.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/template/test_list.dart
diff --git a/utils/tests/template/test_list.dart b/utils/tests/template/test_list.dart
new file mode 100644
index 0000000000000000000000000000000000000000..98f0970c8997cdcf4d8ae47a948de1b87e973572
--- /dev/null
+++ b/utils/tests/template/test_list.dart
@@ -0,0 +1,25 @@
+// Sample for #each templates:
+//
+// applications.tmpl
+
+#import('dart:html');
+#source('applications.dart');
+
+class Product {
+ String name;
+ int users;
+
+ Product(this.name, this.users);
+}
+
+void main() {
+ List<Product> products = [];
+ products.add(new Product("Gmail", 75000000));
+ products.add(new Product("Talk", 5000000));
+ products.add(new Product("iGoogle", 2000000));
+ products.add(new Product("Dart", 2000));
+
+ var form = new Applications(products);
+
+ document.body.elements.add(form.root);
+}
« no previous file with comments | « utils/tests/template/test_complex2.dart ('k') | utils/tests/template/test_simple.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698