Members
dialog
Get dialog element or create one if needed
- Source:
(constant) MATERIAL_DIALOG_ANIMATION
- Source:
toast
Get toast element or create one if needed
- Source:
Methods
askDialog(msgopt, optionsopt) → {Promise}
Predefined dialog with a yes/no question
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
msg |
String |
<optional> |
'Are you sure?' | Header text |
||||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
<optional> |
Properties
|
- Source:
Returns:
A promise that will resolve if dialog was accepted or reject with error: false
when cancelled
- Type
- Promise
showDialog(header, content, optionsopt) → {Promise}
Opens a dialog
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
header |
string | Header of the dialog |
||||||||||||||||||||||||||||||||||||
content |
string | Content of the dialog, must be a string with all tags, including bottom buttons |
||||||||||||||||||||||||||||||||||||
options |
object |
<optional> |
Properties
|
- Source:
Returns:
A promise that will resolve if dialog was accepted or reject with error: false
when cancelled
- Type
- Promise
(async) showToast(msg, optionsopt)
Opens a toast with provided message
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
msg |
string | Message to be shown |
||||||||||||||||||||||||||
options |
object |
<optional> |
Properties
|
- Source:
Throws:
This will throw if msg
is empty