Created
January 16, 2015 22:53
-
-
Save cmaher/d64b8e67f0d3e4e69d55 to your computer and use it in GitHub Desktop.
Using Hoard with a Model
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
var cacheControl = new Backbone.Hoard.Control(); | |
var MyModel = Backbone.Model.extend({ | |
url: function () { | |
return '/my-models/' + this.id; | |
}, | |
sync: cacheControl.getModelSync() | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment