Last active
September 8, 2015 10:49
-
-
Save rolaveric/fc32a0a0a7502eacee0f to your computer and use it in GitHub Desktop.
Example of using falcor.Model.call()
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
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