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
486 B
Dart
26 lines
486 B
Dart
// Sample for #with templates:
|
|
//
|
|
// productview.tmpl
|
|
// productview2.tmpl
|
|
|
|
|
|
import 'dart:html';
|
|
part 'nestedview.dart';
|
|
|
|
class Person {
|
|
String name;
|
|
int age;
|
|
|
|
Person(this.name, this.age);
|
|
}
|
|
|
|
void main() {
|
|
// Simple template.
|
|
Person person1 = new Person("Aristotle - Bugger for the bottle", 52);
|
|
Person person2 = new Person("René Descartes - Drunken fart", 62);
|
|
|
|
NestedView view = new NestedView(person1, person2);
|
|
document.body.elements.add(view.root);
|
|
}
|
|
|