RESTfull model/controller for AngularJS