ngResource for api rest calls