Constructor
new ServiceLocator()
Methods
register(name, service)
Registers a service with name.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name of the service. |
service |
object | function | The service object or constructor. |
resolve(name) → {object}
Resolves a service by name.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name of the service. |
Returns:
The service object.
- Type
- object
(static) getDefault() → {ServiceLocator}
Gets the default service locator.
Returns:
The default service locator.
- Type
- ServiceLocator