jokade / angulate2

Scala.js bindings for Angular
MIT License
87 stars 15 forks source link

Automatically generate `providers` parameters based on constructor #23

Closed gregghz closed 8 years ago

gregghz commented 8 years ago

Right now you have to do:

@Component(
  providers = @@[FooService, BarService],
  ...
)
class BazComponent(
  fooService: FooService,
  barService: BarService
)

It would be nice to reduce this to:

@Component(
  ...
)
class BazComponent(
  fooService: FooService,
  barService: BarService
)

I think this could be accomplished fairly easily in the @Component macro.