Error handling example

Posted in General by Greg Wed Aug 12 2015 14:53:49 GMT+0000 (UTC)·1·Viewed 1,614 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,
Olivier Combe
Aug 23, 2015

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 });

Olivier Combe marked this as solved
Markdown is allowed