Open friedolinfoerder opened 8 years ago
Do @Input and @Output actually work with @Directive in angular 2?
Yes, they do. In the first example of the official angular2 @Directive docs page there is a demonstration of how to use inputs. (https://angular.io/docs/ts/latest/api/core/Directive-decorator.html)
An example of how to use the outputs field is described on the DirectiveMetadata page: https://angular.io/docs/ts/latest/api/core/DirectiveMetadata-class.html
Inputs and Outputs are working with the @Component decorator but not with the @Directive decorator.
It would be nice to use the component features with the directive decorator so that you can use additional data (which is also databounded) in your directive controller and view.
Working only with the $attrs object - as stated here: #84 - is not the same. So adding inputs and outputs would be great.