If a custom command or operation can accomplish the behavior you need without a direct service reference, this is preferred to decrease the degree of coupling.
@inject decorator can be used to reference a service from within your component model. The following example demonstrates injecting the
RegionService into a custom component model.
The property that the
@inject decorator is bound to will be populated during the initialization process of the component model that the decorator was used in. The property value will be
undefined until the component model is initialized.