saskodh / framework

Lightweight web framework for NodeJS inspired by Spring framework
26 stars 5 forks source link

Add support for class token and alias tokens on components #15

Closed damjangelovski closed 8 years ago

damjangelovski commented 8 years ago

Have support for injecting a component with it's token and the alias provided in the @Component decorator. A class token should be created regardless of other tokens. Example:

@Component(ComponentToken)
class Component {  ...  }

@Component()
class ComponentHolder {

   @Inject(ComponentToken)
   private component: Component;

   @Inject()
   private comp: Component;  // this does not work at the moment
}