Support more decorators
tam5 opened this issue · 4 comments
Any reason the current list of decorators is hardcoded to a select few? There are way more decorators that come into everyday use, (@Injectable
, @Input
, @Output
, @ContentChild
, @ViewChild
, etc).
Should this be based on a regex?
Most likely - I wrote this back when Angular 2 was still in beta, and those decorators were the only ones I was aware of. We could do something like @[A-Za-z0-9_]
without much issue.
makes sense. care to make the update? or would u like a pr
I make a PR for this. I guess \(@[A-Za-z0-9_]+\) could be good enough, although it could be improved.
We now highlight all decorators, as long as the name of the decorator is a valid Typescript identifier. Feel free to re-open or let me know if you're still having trouble after updating ng2-mode
.