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