-
Notifications
You must be signed in to change notification settings - Fork 7
Class: ToastNotificationInitializer
This is the class that needs to be instantiated to set up and ignite a ToastNotification, its purpose is to show short notification to end-user, or even interact with user. It can be evoked from any angular typescript file.
Below is the example with (some optional) user configuration, it will override default configuration from app.module.
Example:
// Create the initializer.
const newToastNotification = new ToastNotificationInitializer();
// Set desired Title.
newToastNotification.setTitle('Warning!');
// Set desired Message.
newToastNotification.setMessage('Form is not valid!');
// Set desired configuration.
newToastNotification.setConfig({
layoutType: DialogLayoutDisplay.WARNING
});
// Open a ToastNotification.
newConfirmBox.openConfirmBox$().subscribe(resp => {
console.log('confirmBox response: ', resp);
});
- IToastCoreConfig: IToastCoreConfig
- layoutType: DialogLayoutDisplay
- IToastNotificationPublicResponse: IToastNotificationPublicResponse
+ new ToastNotificationInitializer(): ToastNotificationInitializer
Returns: ToastNotificationInitializer
▸ openToastNotification$(): Observable<IToastNotificationPublicResponse>
Returns: Observable<IToastNotificationPublicResponse>
▸ setButtonLabels(_Confirm
: string, _Decline?
: string): void
Name | Type |
---|---|
_Confirm |
string |
_Decline? |
string |
Returns: void
▸ setButtons(_Buttons
: IButton[]): void
Name | Type |
---|---|
_Buttons |
IButton[] |
Returns: void
▸ setConfig(_ToastNotificationConfig
: IToastCoreConfig): void
Name | Type |
---|---|
_ToastNotificationConfig |
IToastCoreConfig |
Returns: void
▸ setDispatch(_Title
: string, _Message?
: string): void
Name | Type | Default value |
---|---|---|
_Title |
string | - |
_Message |
string | null |
Returns: void
▸ setMessage(_Message
: string): void
Name | Type |
---|---|
_Message |
string |
Returns: void
▸ setTitle(_Title
: string): void
Name | Type |
---|---|
_Title |
string |
Returns: void
- AppearanceAnimation
- ButtonLayoutDisplay
- DialogLayoutDisplay
- DisappearanceAnimation
- ToastPositionEnum
- ToastProgressBarEnum
- ToastUserViewTypeEnum