public
Last active

Compilation of KO sample from David Nolen

  • Download Gist
gistfile1.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
var hello_clojurescript = {AppViewModel:function(a, b, c) {
this.firstName = a;
this.lastName = b;
this.fullName = c
}};
hello_clojurescript.AppViewModel.cljs$lang$type = !0;
hello_clojurescript.AppViewModel.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "hello-clojurescript/AppViewModel")
};
hello_clojurescript.AppViewModel.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "hello-clojurescript/AppViewModel")
};
hello_clojurescript.AppViewModel;
hello_clojurescript.my_model = function(a, b) {
return new hello_clojurescript.AppViewModel(ko.observable(a), ko.observable(b), ko.computed([cljs.core.str(hello_clojurescript.firstName.call(null)), cljs.core.str(" "), cljs.core.str(hello_clojurescript.lastName.call(null))].join("")))
};
ko.applyBindings(hello_clojurescript.my_model.call(null, "Bob", "Smith"));

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.