shuhei / babel-plugin-angular2-annotations

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

Constructor setter support? #23

Closed amcdnl closed 8 years ago

amcdnl commented 8 years ago

I think one of my favorite things in typescript is the ability to do something like:

@Component({ /* ... */ })
class HelloComponent {
  constructor(private ngZone: NgZone) { }
}

and ngZone be on the scope of the HelloComponent. Any thoughts on this?

shuhei commented 8 years ago

It might be handy but this is not a repo that supports everthing TypeScript has.

shuhei commented 8 years ago

Something like this might work. I haven't maintained it though.

amcdnl commented 8 years ago

@shuhei I agree, not trying to reproduce typescript but I thought it was kinda along the same lines as the constructor annotations.

I've actually seen that :) before but I don't always want to assign them :S.