Skip to content

Instantly share code, notes, and snippets.

@tilast
Created October 16, 2014 14:48
Show Gist options
  • Save tilast/e1a1db0eee9031c3bdb9 to your computer and use it in GitHub Desktop.
Save tilast/e1a1db0eee9031c3bdb9 to your computer and use it in GitHub Desktop.
(function(){
var restaurantsMap = (function(){
var map,
googleMap,
model;
model = function() {
this.data = ko.observable();
this.restaurants = ko.pureComputed(function(){
return this.data() + "2222";
}, this);
};
return {
init: function() {
},
model: new model()
}
}());
window.onload = function() {
restaurantsMap.init();
ko.applyBindings(restaurantsMap.model);
console.log(restaurantsMap.model);
restaurantsMap.model.data('lalalaal');
console.log(restaurantsMap.model.data());
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment