Comment

Carl Armbruster

I tried to do something like this about 6 months ago but didn't really have a good handle on promises and on using promises in services. We had other work to do so we just make our required call synchronouse with a quick class I created. Ugly, yes. Worked, yes. Fast forward and I finally have a chance to revisit the ugly code I wrote and did a quick search on promises and found this. After quite a bit more experience with promises your simple example above explains exactly the piece I was missing with defferred promises.

Fixing my ugly code now - thanks!