Created
June 18, 2014 23:55
-
-
Save jkmcrg/696d902845163636b4fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.factory 'Project', [ | |
'$resource' | |
($resource) -> | |
Project = -> | |
@service = $resource('/api/projects/:projectId', {projectId: '@id'}) | |
return | |
Project::all = -> | |
@service.query() | |
Project::get = (id) -> | |
return @service.get({projectId: id}) | |
Project::modules = -> | |
console.log 'mods' | |
return new Project | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment