Add support for current angular promise support

Add support for current promise api using "then" instead of "success".