Class Factory

public

Registered 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.

Show:

Module: @ember/owner
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.