angular rest & promise played