Fix promise resolve in angular version