Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NotificationService

Notification service used to notify user about important events in the application.

You may configure the service with: setDelay, setVerbose and setPersist.

Hierarchy

  • NotificationService

Index

Constructors

constructor

Accessors

getNotificationsObserver

  • get getNotificationsObserver(): Observable<Notification[]>

Methods

getNotifications

httpError

  • httpError(message: string, httpResponse: any): void

message

  • message(type: string, header: string, message: string, isPersistent: boolean, primaryAction: Action, moreActions: Action[]): void
  • Generate a notification message

    Parameters

    • type: string

      The notification type

    • header: string

      The notification header

    • message: string

      The notification message

    • isPersistent: boolean

      True if the notification should be persistent

    • primaryAction: Action

      The primary action for the notifiaction

    • moreActions: Action[]

      More actions for the kebab

    Returns void

remove

setDelay

  • setDelay(delay: number): void

setPersist

  • setPersist(persist: boolean): void
  • Sets persist option for particular modes. Notification with persistent mode won't be dismissed after delay, but has to be closed manually with the close button. By default, the "error" and "httpError" modes are set to persistent.

    Parameters

    • persist: boolean

      Set to true to persist notifications

    Returns void

setVerbose

  • setVerbose(verbose: boolean): void

setViewing

  • setViewing(notification: Notification, isViewing: boolean): void

Generated using TypeDoc