Begin abstracting global container into injector
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
DEPENDENCY_KEYS_SERVICE_TYPE_KEY,
|
||||
PropertyDependency,
|
||||
} from '../types'
|
||||
import {Container} from '../Container'
|
||||
import {ContainerBlueprint} from '../ContainerBlueprint'
|
||||
|
||||
/**
|
||||
* Get a collection of dependency requirements for the given target object.
|
||||
@@ -145,9 +145,9 @@ export const Singleton = (name?: string): ClassDecorator => {
|
||||
Injectable()(target)
|
||||
|
||||
if ( name ) {
|
||||
Container.getContainer().registerNamed(name, target)
|
||||
ContainerBlueprint.getContainerBlueprint().registerNamed(name, target)
|
||||
} else {
|
||||
Container.getContainer().register(target)
|
||||
ContainerBlueprint.getContainerBlueprint().register(target)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user