Friday, May 16, 2014

Angular.js: Try/Catch/Finally using the Q module

Similar to exception handling in .NET the Q promise module inside Angular.js supports a try/catch/finally construct. However as ‘finally’ is a reserved keyword in JavaScript, you have to use the indexer to access the finally function:

No comments: