aurelia / dependency-injection

A lightweight, extensible dependency injection container for JavaScript.
MIT License
160 stars 66 forks source link

Feature Request: Advanced DI Documentation / Cookbook #142

Open rayalan opened 7 years ago

rayalan commented 7 years ago

So having spent time figuring out how to convert various oddities of my app into Aurelia's dependency injection system, I would like to see an "advanced" document (since the current one is called "basics"), or perhaps a cookbook that shows some advanced patterns with light commentary. I eventually came across https://github.com/aurelia/dependency-injection/issues/57 and https://github.com/aurelia/dependency-injection/issues/38, which pointed me in the right direction.

As far as I can tell, the DI system exports a number of interesting functions that aren't mentioned, or are mentioned in passing in the basic documentation (e.g. Factory, FactoryInvoker).

My ideal cookbook would include:

I'm not entirely sure that's the right way to format the documentation, but having gotten to the point where I now have working code, it's my best suggestion for helping others learn better.

Alexander-Taran commented 6 years ago

@rayalan would you like to help out with this one and provide a PR?