Angular JS working with API controller