javascript - AngularJS code not executing InternetExplorer when Developer Tools are closed -
unfortunately i've stumbled upon problem application. when running in internet explorer.
i earlier found related console.log problem, there no console.log anywhere in code. however, when opening console (f12 developer tools) application runs expected.
could related $parent.$on function?
$scope.$parent.$on("updatecart", function (e) { shoppingcartservice.getitems().then(function (d) { vm.items = d; }); });
it cannot related that, , i'm sure in fact console.log in place don't expect it.
you can debug javascript without developer console alerting errors:
window.onerror = function(msg, url, linenumber) { alert('error message: '+msg+'\nurl: '+url+'\nline number: '+linenumber); return true; }
or including firebug lite: https://getfirebug.com/firebuglite
update: if errors still don't show up, try overriding angularjs's exception handler: (see https://stackoverflow.com/a/25285528/451480)
yourapp.factory('$exceptionhandler', function() { return function(exception, cause) { alert('error message: '+exception.message+'\nurl: '+exception.filename+'\nline number: '+exception.linenumber+'\ncause: '+cause); }; });
Comments
Post a Comment