58a016634c
This doesn't include adding partofs; that will have to be done later. Review URL: https://codereview.chromium.org//11358145 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14693 260f80e4-7a28-3924-810f-c04153c831b5
26 lines
508 B
Dart
26 lines
508 B
Dart
// Sample for #each templates:
|
|
//
|
|
// applications.tmpl
|
|
|
|
import 'dart:html';
|
|
part '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);
|
|
}
|