Allow Directives to write properties on their current element. Currently this is handled with @ProportySetter('name') but will be move to this style for easier test ability/consistency.
Currently:
@Component({
selector: 'my-component'
})
class MyComponent {
constructor(
@PropertySetter('class.my-class)' myClass,
@PropertySetter('hidden')
) {
myClass.set(true);
}
}
Proposed:
@Component({
selector: 'my-component',
setters: ['hidden', 'classMyClass: class.my-class']
})
class MyComponent {
myClass:Emitter;
hidden:Emitter
constructor() {
myClass = new Emitter();
hidden = new Emitter();
}
}
Allow Directives to write properties on their current element. Currently this is handled with
@ProportySetter('name')but will be move to this style for easier test ability/consistency.Currently:
Proposed:
attr.foo, 'class.bar`, and so on. (But it does not set values on other Directives/Components)Emittercan be replaced withObservables for now.