91dd628bd8
Need unique name for library collision with template parser. Few more changes to work under VM. More changes for lang.dart seperation. Seperation from lang.dart (tokenizer can't access private fields of base class in another library). This was allowed in frog but not in the VM. VM is right so need to sever dependency. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com//9695048 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5544 260f80e4-7a28-3924-810f-c04153c831b5
24 lines
392 B
Dart
24 lines
392 B
Dart
// Sample for #with templates:
|
|
//
|
|
// productview.tmpl
|
|
// productview2.tmpl
|
|
|
|
|
|
#import('dart:html');
|
|
#source('productview.dart');
|
|
|
|
class Person {
|
|
String name;
|
|
int age;
|
|
|
|
Person(this.name, this.age);
|
|
}
|
|
|
|
void main() {
|
|
// Simple template.
|
|
Person person = new Person("Terry Lucas", 52);
|
|
ProductView view = new ProductView(person);
|
|
document.body.elements.add(view.root);
|
|
}
|
|
|