Source code for my blog post about the $resource service