feat(core): add support for @Property and @Event decorators#3992
feat(core): add support for @Property and @Event decorators#3992vsavkin wants to merge 1 commit intoangular:masterfrom
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: