angular-toastr
angular-toastr copied to clipboard
Improve clear
As per discussion at https://github.com/Foxandxss/angular-toastr/issues/137:
- Sometimes
clear(toast)
doesn't immediately clear - People expect
clear([toast])
should work for a list arg[toast]
This fixes both issues.
Hi @Foxandxss -- anything I can do to encourage you to merge this? thx!
I just need time to think, that is a breaking change which forces me a new major version.
@Foxandxss I don't think it breaks the API -- just expands it to accept clear(list)
in addition to clear(toast)
and clear()
which both still work as before.
and the contract of remove
should be that the toast is immediately gone, from the user's perspective. if the destroy is immediate it is no-op, but in cases where the event handler delays the destroy (until other toasts finish for some reason i couldn't figure out) setting the element's html to ""
means it is apparently gone until the handler catches up.
LMK if i can help at all. thx.