Error handling example
Solved!Posted in General by Greg Wed Aug 12 2015 14:53:49 GMT+0000 (Coordinated Universal Time)·1·Viewed 3,109 times
Are there any examples of handling file not found errors in resolve? I'd like to be able to catch these and return an error handler module. Thx,
It's easy, all functions return a promise.
Promises in Angular have 2 callbacks, the first one is success, the second one is error:
$ocLazyLoad.load('testModule.js').then(function() { // success }, function(err) { // error });
marked this as solved