Skip to content

Instantly share code, notes, and snippets.

@tsloughter
Created July 11, 2011 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsloughter/1076056 to your computer and use it in GitHub Desktop.
Save tsloughter/1076056 to your computer and use it in GitHub Desktop.
class @viewModel
firstname : ko.observable ""
lastname : ko.observable ""
email : ko.observable ""
username : ko.observable ""
password : ko.observable ""
save : ->
$.post '/user', ko.toJSON(this), (data) -> $('body').append "Successfully created user."
viewmodel = new viewModel
ko.applyBindings viewmodel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment