| OLD | NEW |
| 1 // Sample for #each templates: | 1 // Sample for #each templates: |
| 2 // | 2 // |
| 3 // applications.tmpl | 3 // applications.tmpl |
| 4 | 4 |
| 5 #import('dart:html'); | 5 import 'dart:html'; |
| 6 #source('applications.dart'); | 6 part 'applications.dart'; |
| 7 | 7 |
| 8 class Product { | 8 class Product { |
| 9 String name; | 9 String name; |
| 10 int users; | 10 int users; |
| 11 | 11 |
| 12 Product(this.name, this.users); | 12 Product(this.name, this.users); |
| 13 } | 13 } |
| 14 | 14 |
| 15 void main() { | 15 void main() { |
| 16 List<Product> products = []; | 16 List<Product> products = []; |
| 17 products.add(new Product("Gmail", 75000000)); | 17 products.add(new Product("Gmail", 75000000)); |
| 18 products.add(new Product("Talk", 5000000)); | 18 products.add(new Product("Talk", 5000000)); |
| 19 products.add(new Product("iGoogle", 2000000)); | 19 products.add(new Product("iGoogle", 2000000)); |
| 20 products.add(new Product("Dart", 2000)); | 20 products.add(new Product("Dart", 2000)); |
| 21 | 21 |
| 22 var form = new Applications(products); | 22 var form = new Applications(products); |
| 23 | 23 |
| 24 document.body.elements.add(form.root); | 24 document.body.elements.add(form.root); |
| 25 } | 25 } |
| OLD | NEW |