Brendan McKenzie

AngularJS Models

Monday, 18 August 2014

I was looking for a method to abstract away integrating my RESTful services for regular CRUD operations. There's ngResource, but it's a bit voodoo and restrictive. I wanted to come up with a solution that was a bit more simplictic that's also not surrounded by magic.

You can find the code here along with a simple implementation. Prior to this I had a service that returned promises that I had to implement the callbacks for.

The implementation isn't tightly coupled to AngularJS so could realistically be used with any framework.

The primary goals of this were: