Solved issue of angular  not playing well with imjs promises.