어떻게이 자바 스크립트를 coffeescript로 바꿀 수 있습니까?knockoutjs javascript to coffeescript
다음jQuery ->
AppViewModel = ->
this.firstName = ko.observable("something")
ko.applyBindings(new AppViewModel())
는 커피 스크립트가의 한 부분으로 일) 당신이 ko.applyBindings을 만드는 커피 스크립트 버전 (에서
(function() {
jQuery(function() {
var ViewModel;
ViewModel = function() {
return this.firstName = ko.observable();
};
return ko.applyBindings(new ViewModel());
});
}).call(this);
gah, 맞아요. 들여 쓰기 잘못됨. – Brand