Created
March 19, 2018 20:16
-
-
Save alexzuza/0ffb452cdda98620c7d02f8034208973 to your computer and use it in GitHub Desktop.
DI element injector resolver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const providerDef = | |
(allowPrivateServices ? elDef.element!.allProviders : | |
elDef.element!.publicProviders)![tokenKey]; | |
if (providerDef) { | |
let providerData = asProviderData(searchView, providerDef.nodeIndex); | |
if (!providerData) { | |
providerData = { instance: _createProviderInstance(searchView, providerDef) }; | |
searchView.nodes[providerDef.nodeIndex] = providerData as any; | |
} | |
return providerData.instance; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment