What’s the correct way to register new factories at runtime? As far as I can tell, there are only two options:
-
container.register(type, factory)
– this emits a deprecation warning. See https://github.com/emberjs/ember.js/blob/v1.12.0/packages/container/lib/container.js#L160-L185 -
container._registry.register(type, factory)
– this relies on a private API. See https://github.com/emberjs/ember.js/blob/v1.12.0/packages/container/lib/container.js#L178 in particular.