Asp.Net Core abstraction for server side rendered toast notifications using toast.js or noty.js. Supports AJAX calls as well.
Updated to 2.1 and use Razor SDK.
Added DisableAjaxToasts
in NToastNotifyOption
class which if set to true will disable Ajax Toasts. Handy when you might have restrictions in reading/writing custom request/response headers as ajax toasts use custom headers for message transportation which I agree is not a very nice way to do it.
Cheers !
Updated nuget packages and samples. Minor Fixes.
Trying to fix #24 .
fetch('/Home/Ajax').then(function(response){
var messages = nToastNotify.toastr.fetchGetMessagesFromResponse(response);
nToastNotify.toastr.showToasts(messages)
})
ToastEnums
changed to Enums
AddToastNotify()
method now needs to be used on IMvcBuilder interface. For e.g.services.AddMvc().AddNToastNotify(new ToastOption()
{
ProgressBar = false,
PositionClass = ToastPositions.BottomCenter
}, new NToastNotifyOption()
{
SuccessMessage = "Overwritten default success message"
}); ;
Also need to add as middleware in the Configure
method.
app.UseNToastNotify();
Fixed PeekMessages not peeking.
Added support to netstandard2.0