Managing long running operation using promise and $$q

5 באפריל 2015

Through my previous post I described the challenges when implementing long running operation. Basically, you need to break your long running operation into small steps where each step is isolated by setTimeout(0) from the next step. At this post I would like to cover a technique for using promise object to manage the long running operation. Angular's promises offer the common then/catch functions but also offer an additional function named notify The notify function can be used to send notifications to the client about the progress of the running operation. For example, suppose a runTask function is responsible for initiating a long running...
tags: , ,
no comments