Created
July 8, 2012 17:46
-
-
Save lusentis/3072022 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
define ['router', 'text!templates/document.html'], (routerjs, template_doc) -> | |
class Document extends routerjs.SyncModel | |
url: '/document/' # API end point | |
template: template_doc # HTML Template to render when fetching data with @get | |
Document.mine = (callback) -> | |
@req 'mine/', 'GET', {}, callback | |
Document.countByGroup = (callback) -> | |
@req 'count/', 'GET', {}, callback | |
return Document |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment