doriansmiley / lotusJS-MWV

MVW framework for applications based on lotusJS web components
2 stars 0 forks source link

Update DI in readme #11

Open doriansmiley opened 6 years ago

doriansmiley commented 6 years ago

Update the readme docs to include samples of mapping objects with constructor parameters, and a sample of passing a key value in @inject which will be used in place of the objects type. Also include information of the fact that targets of @injectable must expose an IContext property and pass in constructor. Include example of how to pass a context ref in the injector, for example:

 this.injector.mapObject(TestObjectSub, TestObjectSub, false, [this]);

Note which base classes already expose a Contextproperty and pass in the constructor.