Back to Vendure

AlertContext

docs/docs/reference/admin-ui-api/alerts/alert-context.mdx

3.6.31.7 KB
Original Source
<GenerationInfo sourceFile="packages/admin-ui/src/lib/core/src/providers/alerts/alerts.service.ts" sourceLine="29" packageName="@vendure/admin-ui" since="2.2.0" />

The context object which is passed to the check, isAlert, label and action functions of an AlertConfig object.

ts
interface AlertContext {
    injector: Injector;
    dataService: DataService;
    notificationService: NotificationService;
    modalService: ModalService;
}
<div className="members-wrapper">

injector

<MemberInfo kind="property" type={<a href='/reference/typescript-api/common/injector#injector'>Injector</a>} />

The Angular Injector which can be used to get instances of services and other providers available in the application.

dataService

<MemberInfo kind="property" type={<a href='/reference/admin-ui-api/services/data-service#dataservice'>DataService</a>} />

The DataService, which provides methods for querying the server-side data.

notificationService

<MemberInfo kind="property" type={<a href='/reference/admin-ui-api/services/notification-service#notificationservice'>NotificationService</a>} />

The NotificationService, which provides methods for displaying notifications to the user.

modalService

<MemberInfo kind="property" type={<a href='/reference/admin-ui-api/services/modal-service#modalservice'>ModalService</a>} />

The ModalService, which provides methods for opening modal dialogs.

</div>