shuhei / babel-plugin-angular2-annotations

A babel transformer plugin for Angular 2 annotations
80 stars 9 forks source link

Drop support of parameter decorators #16

Closed shuhei closed 8 years ago

shuhei commented 8 years ago

The babel team is going to forbid people from monkey-patching the parser.

https://github.com/babel/babel/pull/3204

Parameter decorators used in Angular 2

DI for directives

https://angular.io/docs/ts/latest/api/#!?apiFilter=metadata

JonnyBGod commented 8 years ago

Why remove @Query?

shuhei commented 8 years ago

@JonnyBGod Because the parameter decorator syntax cannot be parsed by Babel. This plugin used to monkey-patch the Babel's parser but the newer version of Babel has forbidden monkey-patching on its parser.

By the way, you'll be able to achieve similar things as @Query by @ContentChildren.