Catching OnErrorItem #497
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
I'm trying to use the FileUploader.onErrorItem function to be able to get my response from the server.
Thing is that it seems that when trying to naively use the function as follow :
The Handler code is executed outside the Angular Zone which lead to the fact that my
showErrorboolean is not re-evaluated by the template.Is there any clean way to get an event that I could listen to ?
Thanks for the hard work and all the good advices that you can provide.
Just for the sake of others developers here is a workaround:
The trick is to inject the NgZone in the constructor and use it for the
onErrorItemcallback.This is clearly a workaround, the way I see this, but I may not be most qualified to give this advice. The
FileUploadershould provide relevant events upon those, this way we could bind on it and stay in the Angular Zone.It worked like that for me. Hope it does the job for you?