feat(dart/transformer:: Initial commit of ctor stubs & annotation register
Closes #646 Closes #496 Closes #498
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
library bar;
|
||||
|
||||
import 'package:angular2/src/core/annotations/annotations.dart';
|
||||
|
||||
@Directive(context: 'soup')
|
||||
class Component {
|
||||
Component();
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
import 'package:angular2/src/reflection/reflection.dart' show reflector;
|
||||
import 'bar.dart' as i0;
|
||||
import 'package:angular2/src/core/annotations/annotations.dart' as i1;
|
||||
import 'index.dart' as i2;
|
||||
|
||||
main() {
|
||||
reflector
|
||||
..registerType(i0.Component, {
|
||||
"factory": () => new i0.Component(),
|
||||
"parameters": const [const []],
|
||||
"annotations": const [const i1.Directive(context: 'soup')]
|
||||
});
|
||||
i2.main();
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
library web_foo;
|
||||
|
||||
import 'bar.dart';
|
||||
|
||||
void main() {
|
||||
new Component('Things');
|
||||
}
|
Reference in New Issue
Block a user