-
-
Save fouad/50be1722f110140c0b45 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// model(db, query) | |
var model = mesh.model(db, { _id: "ball" }); | |
// watch entire model | |
model.watch(function() { | |
}); | |
// watch specific props (delta) | |
model.watch({active: true}, function() { | |
}); | |
model.save(function() { | |
}); | |
model.load(function() { | |
}); | |
// model.[watch|load]([props], callback) | |
model.set("active", !model.active); | |
model.save(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment