Hi I'm trying to upload files to service following this tutorial: Upload files Angular, and some of the code is like this:
element.bind('change', function() {
scope.$apply(function() {
var file = element[0].files[0];
... //some logic
});
});
It has been working fine on Chrome and Safari, but when I tested it on IE, it's giving me this error:
Error: [$rootScope:inprog] $apply already in progress
with reference to this line:
scope.$apply(function() {
and the following code doesn't get executed. I don't get such errors in Chrome and following code runs fine. I've tried this: get rid of $apply error, then the error doesn't show up, but the following code still doesn't execute. How can I solve this? Thanks! (I'm using IE11)