Geocortex Web uses dependency injection as a way to obtain a reference to Geocortex Web services in your application. Services can be referenced from other services.
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 custom service. The following example demonstrates injecting the
RegionService into a custom service.
The property that the
@inject decorator is bound to will be populated during the initialization process of the service that the decorator was used in. The property value will be
undefined until the service is initialized.