The content of this section:
- Display information
- Confirm
The message API displays a message to the user or obtains a confirmation from the user.
The Message API is implemented by default using the Sweetalert, and for the Sweetalert to work properly, you should include its CSS and JavaScript files, and then include the Abp.sweet-alert.js adapter in your page.
Display information
For example:
Abp.message.info ('some info message','some optional title'); Abp.message.success ('some success message','some optional title'); Abp.message.warn ('Some warning message','some optional title'); Abp.message.error ('some error message','some optional title');
A successful message is as follows:
Confirm
For example:
abp.message.confirm ( 'User admin'll be deleted. ' , ' Is you sure? ' , function (isconfirmed) { if (isconfirmed) { // ... delete User } });
The second parameter (title) is optional here (so the callback function can be used as the second argument).
A confirmation message is as follows:
The ABP uses the message API internally, for example, an Ajax call to the wrong ABP to invoke Abp.message.error.
kid1412 attached: English Original: Http://www.aspnetboilerplate.com/Pages/Documents/Javascript-API/Message
<<ABP documentation >> Javascript api-message