Feature register multiple with selector tags
This change set adds a feature found in .NET, whereby the same type name can be registered multiple times with different tags/selectors, so that a keyed container is returned with the ability to lookup a particular type at runtime.
e.g.
$jsInject.register('WidgetFactory', [() => new WidgetFactoryA()], 'WidgetA');
$jsInject.register('WidgetFactory', [() => new WidgetFactoryB()], 'WidgetB');
var factory = $jsInject.get('WidgetFactory', 'WidgetB'); or var provider = $jsInject.get('WidgetFactory'); var factory = provider['WidgetB'];
Hi, in the spirit of this being a tool for teaching DI I don't want to overly complicate the implementation. I like the changes and have two suggestions ... either (a) fork and release there, or (b) update the README to explain the changes and I will merge here. Thanks for your time and contributions!