Restful resources for AngularJS