-
Notifications
You must be signed in to change notification settings - Fork 159
Open
Description
I am unable to get the showLoaderOnConfirm animation working in both ngSweetAlert or ngSweetAlert2 using the following syntax:
swal({
title: 'Forgot Password?',
text: 'Enter your email address and your password will be reset and emailed to you.',
input: 'email',
showCancelButton: true,
confirmButtonText: 'Send',
confirmButtonColor: "#DD6B55",
inputPlaceholder: 'Email address',
showLoaderOnConfirm: true,
preConfirm: function( email ) {
return new Promise(function( resolve, reject ) {
setTimeout(function() {
AccountFactory.resetAccount( email )
.then(function( data ) {
swal({
title: 'Success!',
text: 'A verification email has been sent to ' + email,
type: 'success',
confirmButtonText: 'Close',
allowEscapeKey: false
});
}, function() {
swal({
title: 'Email not found',
text: 'Sorry, but we could not find an account matching that email address.',
type: 'error',
confirmButtonText: 'Close',
allowEscapeKey: true
});
});
}, 2000 );
});
},
allowOutsideClick: false
});
I understand preConfirm was introduced in ngSweetAlert2, but the showLoaderOnConfirm was not working for me in version 1 either, hence moving to version 2.
I'm just wondering if this functionality is actually supported in the Angular wrappers, or I'm doing something wrong?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels