Class Factory
publicRegistered factories are instantiated by having create called on them. Additionally they are singletons by default, so each time they are looked up they return the same instance.
However, that behavior can be modified with the instantiate
and singleton
options to the Owner.register()
method.
create (initialValues) Object public
Module:
@ember/owner
Defined in packages/@ember/-internals/owner/index.ts:368
- initialValues
- Object
Any values to set on an instance of the class
- returns
- Object
The item produced by the factory.
A function that will create an instance of the class with any dependencies injected.