registerOptionsForType (type, options) public
Allow registering options for all factories of a type.
let App = Ember.Application.create(); let appInstance = App.buildInstance(); // if all of type `connection` must not be singletons appInstance.optionsForType('connection', { singleton: false }); appInstance.register('connection:twitter', TwitterConnection); appInstance.register('connection:facebook', FacebookConnection); let twitter = appInstance.lookup('connection:twitter'); let twitter2 = appInstance.lookup('connection:twitter'); twitter === twitter2; // => false let facebook = appInstance.lookup('connection:facebook'); let facebook2 = appInstance.lookup('connection:facebook'); facebook === facebook2; // => false
Parameters:
-
type
String
-
options
Object
Please login to continue.