Alert
A sub namespace of UI, exclusive for alert operations
//accessing to ui.alert methods
SW.UI.Alert.{methodName}
clear
Description
This method can be used to clear a toastr that is being displayed.
Method(s)
1 function clear(): void
Basic Usage
SW.UI.Alert.clear(),
error
Description
This method can be used to show a Error toastr in the window and also in the console.
Method(s)
1 function error(
2 response: string | HttpErrorResponse,
3 params: {
4 documentName?: DocumentName,
5 userName?: string,
6 userId?: string,
7 onClick?: Function
8 } = {}
9 ): void
Parameter | Type | Required | Defaults | Description |
---|---|---|---|---|
response | string | HttpErrorResponse | true | The message to be displayed in the alert | |
documentName | DocumentName | false | Document name | |
userName | string | false | User's name | |
userId | string | false | User's id | |
onClick | Function | false | Function executed when toastr is clicked |
Basic Usage
SW.UI.Alert.error("Toast error");