[ember] Ember.Container#factoryFor (#27483)

This commit is contained in:
Mike North 2018-07-23 08:29:33 -07:00 committed by Andy
parent 1cbfb298e6
commit fbe2d02cb2
2 changed files with 7 additions and 0 deletions

View File

@ -311,6 +311,10 @@ declare module 'ember' {
* Given a fullName return a corresponding instance.
*/
lookup(fullName: string, options?: {}): any;
/**
* Given a fullName return a corresponding factory.
*/
factoryFor(fullName: string, options?: {}): any;
}
const _ContainerProxyMixin: Mixin<_ContainerProxyMixin>;

View File

@ -15,3 +15,6 @@ appInstance.register('some:injection', class Foo {}, {
singleton: false,
instantiate: true,
});
appInstance.factoryFor('router:main');
appInstance.lookup('route:basic');