Created
February 25, 2014 12:10
-
-
Save rikukissa/9207710 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
form(data-bind='submit: loadFoobar') | |
button(type='submit', data-bind='css: { loading: loadFoobar.loading }') |
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 ViewModel | |
constructor: -> | |
@loadFoobar.loading = ko.observable false | |
loadFoobar: -> | |
@loadFoobar.loading true | |
makeAjaxRequest => | |
@loadFoobar.loading false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment