-
Notifications
You must be signed in to change notification settings - Fork 25.6k
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
feat(core): add support for @Property and @Event decorators #3992
Conversation
Example: @directive({selector: 'my-selector'}) class MyDirective { @Property() prop; @Property('el-prop') prop2; @event() event; @event('el-event') event2; }
can we also get an Observable event? update: nvm I see it's possible |
Merging PR #3992 on behalf of @vsavkin to branch presubmit-vsavkin-pr-3992. |
This is really syntactic sugar right? We will still be able to use |
I like this idea and think it's an improvement over the current properties:[] syntax. Seems more clear to me. |
@thelgevold yes, but if you'd write that in ES5, creating an annotation by hand everytime you wanna add a property is kinda huge. |
@PascalPrecht Yes, I think that is a good point. I am guessing they will still support the current properties:[] along side this new idea. Probably just a new short notation like you pointed out above. |
Simply awesome guys! 👍 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Example: