Skip to content

Instantly share code, notes, and snippets.

@frozzare
Created March 18, 2013 22:12
Show Gist options
  • Select an option

  • Save frozzare/5191286 to your computer and use it in GitHub Desktop.

Select an option

Save frozzare/5191286 to your computer and use it in GitHub Desktop.
function ViewModel() {
this.firstName = ko.observable("Fredrik");
this.lastName = ko.observable("Forsmo");
this.fullName = ko.computed(function() {
return this.firstName() + " " + this.lastName();
}, this);
}
ko.applyBindings(new ViewModel());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment