saskodh / framework

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

Lazy load @Inject type-casting #50

Open damjangelovski opened 8 years ago

damjangelovski commented 8 years ago

Currently the @Inject() property type is checked if it is @Component in the decorator itself. If @Inject() is run before @Component() of the injected type, the decorator will throw. So ComponentUtil.isComponent(type) should be lazy-loaded on ApplicationContext constructor or start() method.