SORU
2 EKİM 2012, Salı


TypeScript KnockoutJS ile

KnockoutJS ile TypeScript kullanarak herhangi bir örnek var mı? Sadece birlikte çalışmak nasıl olacağını merak ediyorum?

Edit

Ben ne burada, iş gibi görünüyor

declare var ko: any;
declare var $: any;
class ViewModel {
    x = ko.observable(10);
    y = ko.observable(10);

}

$(() => {
    ko.applyBindings(new ViewModel());
});

Bu aşağıdaki Javascript içine oluşturur:

var ViewModel = (function () {
    function ViewModel() {
        this.x = ko.observable(10);
        this.y = ko.observable(10);
    }
    return ViewModel;
})();
$(function () {
    ko.applyBindings(new ViewModel());
});

CEVAP
26 EKİM 2012, Cuma


DefinitelyTyped bak.

Popüler JavaScript kütüphaneleri için "TypeScript tür tanımları depo"

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • DragsterMC Gaming

    DragsterMC G

    30 HAZİRAN 2013
  • Caramella Girls

    Caramella Gi

    19 Mayıs 2008
  • TouchePro

    TouchePro

    27 EYLÜL 2007