-
Notifications
You must be signed in to change notification settings - Fork 13
Constructor Parameters
Brian Kotek edited this page Aug 26, 2014
·
1 revision
Back to Advanced IoC Configuration
If needed, constructor parameters can be specified for a dependency provider. These parameters will be passed into the constructor of the target object when it is created. Constructor parameters can be configured in the following way:
Deft.Injector.configure({
contactStore: {
className: 'MyApp.store.ContactStore',
// Specify an array of params to pass into ContactStore constructor
parameters: [{
proxy: {
type: 'ajax',
url: '/contacts.json',
reader: {
type: 'json',
root: 'contacts'
}
}
}]
}
});