A wrapper for Angular's Deferred API