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'm just wondering if this functionality is actually supported in the Angular wrappers, or I'm doing something wrong?
I am unable to get the
showLoaderOnConfirmanimation working in both ngSweetAlert or ngSweetAlert2 using the following syntax:I understand
preConfirmwas introduced inngSweetAlert2, but theshowLoaderOnConfirmwas 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?