Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inputs and outputs for @Directive decorator #140

Open
friedolinfoerder opened this issue Jan 29, 2016 · 2 comments
Open

inputs and outputs for @Directive decorator #140

friedolinfoerder opened this issue Jan 29, 2016 · 2 comments

Comments

@friedolinfoerder
Copy link

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.

@timkindberg
Copy link
Contributor

Do @input and @output actually work with @directive in angular 2?

@friedolinfoerder
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants