There was an error while loading. Please reload this page.
Back to Advanced IoC Configuration
The Injector can also be configured to map identifiers to values::
Deft.Injector.configure({ brandedApplicationName: { value: "Contact Manager" }, versionNumber: { value: 1.0 }, modules: { value: [ 'contacts', 'customers', 'orders' ] }, ... });
A value can be any native JavaScript type, including Strings, Arrays, Numbers, Objects or class instances… even Functions!
**NOTE: Values can only be configured as singletons and cannot be eagerly instantiated.