A model/collection service for Angular.js
1 person uses it
Author: Acf54b662a117afbdf33f54fce9723fc? killercup


A model/collection service for Angular.js

Inspired by $resource, I wanted to create a service that can manage the data retrieved from an API and always return the same objects, so Angular will automatically update all your views.

Build Status


For now, just make sure the src/ is somewhere in your build process so you can require EpicModel in your modules.


  • Underscore/Lodash


You should read the inline documentation for src/ It's quite comprehensive and full of examples.


  • [x] Retrieve single object resource (e.g. /users/me)
  • [x] Retrieve list resources and manage them in an array structure
  • [x] Update list resources after retrieving matching single resource
  • [x] Add custom sub-resources (e.g. /users/$id/follow as User.follow(id))
  • [x] Incremental updates (รก la /messages?since=1386150532, see extras_spec)
  • [ ] Transform requests
  • [x] Transform response
  • [x] Customizable URL patterns (always uses $url/$id for now, but should also offer stuff like /item/{item._id}/property/{_id})
  • [x] Persistent storage wrapper (save to storage, retrieve when initializing)
  • [x] Implemented localStorage wrapper
comments powered by Disqus
This page was last updated almost 5 years ago.