feat(dart/transform): Generate setter stubs.
Generate calls to Reflector#registerSetters from the information in provided `Directive#bind` values. This is only an initial attempt - it covers only the most basic values of `bind`. Closes #780
This commit is contained in:
@ -0,0 +1,26 @@
|
||||
library angular2.src.transform.generated;
|
||||
|
||||
import 'package:angular2/src/reflection/reflection.dart' show reflector;
|
||||
import 'bar.dart' as i0;
|
||||
import 'package:angular2/src/core/annotations/annotations.dart' as i1;
|
||||
|
||||
setupReflection() {
|
||||
reflector
|
||||
..registerType(i0.MyComponent, {
|
||||
"factory": () => new i0.MyComponent(),
|
||||
"parameters": const [const []],
|
||||
"annotations": const [
|
||||
const i1.Component(
|
||||
selector: 'soup', componentServices: const [i0.ToolTip])
|
||||
]
|
||||
})
|
||||
..registerType(i0.ToolTip, {
|
||||
"factory": () => new i0.ToolTip(),
|
||||
"parameters": const [const []],
|
||||
"annotations": const [
|
||||
const i1.Decorator(
|
||||
selector: '[tool-tip]', bind: const {'text': 'tool-tip'})
|
||||
]
|
||||
})
|
||||
..registerSetters({"text": (i0.ToolTip o, String value) => o.text = value});
|
||||
}
|
Reference in New Issue
Block a user