Skip to content

Instantly share code, notes, and snippets.

@satoshun
Created March 27, 2013 15:18
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 satoshun/5255008 to your computer and use it in GitHub Desktop.
Save satoshun/5255008 to your computer and use it in GitHub Desktop.
knockoutjs
$(document).ready(function() {
var models = {
names: ko.observableArray([
{"name": "name1"},
{"name": "name2"}
])
};
ko.applyBindings(models);
setTimeout(function(){
models.names.push({"name": "name3"});
}, 2000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment