@service
@service
(serviceName: string): PropertyDecorator
Property decorator: turns the decorated property of a managed object into a read-only reference to the last registered service with given name (case insensitive). See ManagedService
.
The value of the decorated property becomes undefined when the service is destroyed, and updates immediately when a new service is registered with the same name.
Changes and events can be observed by an observer, but only after the property has been read at least once.