Skip to content

Instantly share code, notes, and snippets.

@jashkenas
Forked from tristanz/gist:635621
Created October 20, 2010 02:07
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 jashkenas/635625 to your computer and use it in GitHub Desktop.
Save jashkenas/635625 to your computer and use it in GitHub Desktop.
class ViewModel
firstName: ko.observable 'Bob'
lastName: ko.observable 'Smith'
constructor:
names = -> @firstName() + ' ' + @lastName()
@fullName = ko.dependentObservable names, this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment