Skip to content

Instantly share code, notes, and snippets.

@rolaveric
Last active September 8, 2015 10:49
Show Gist options
  • Save rolaveric/fc32a0a0a7502eacee0f to your computer and use it in GitHub Desktop.
Save rolaveric/fc32a0a0a7502eacee0f to your computer and use it in GitHub Desktop.
Example of using falcor.Model.call()
class MyController {
// ... snip
addTodoClicked() {
// Calls 'todos.add()' with the formModel
this.model.call(['todos', 'add'], [this.formModel])
.subscribe(_ => this.$scope.$evalAsync());
// Clear the form
this.formModel = {};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment