Y at-il d'utiliser l'échantillon avec tapuscrit KnockoutJS? Je suis curieux de savoir comment ils travailleraient ensemble?
modifier
Voici ce que j'ai, semble fonctionner
declare var ko: any;
declare var $: any;
class ViewModel {
x = ko.observable(10);
y = ko.observable(10);
}
$(() => {
ko.applyBindings(new ViewModel());
});
Cela génère dans le Javascript suivant:
var ViewModel = (function () {
function ViewModel() {
this.x = ko.observable(10);
this.y = ko.observable(10);
}
return ViewModel;
})();
$(function () {
ko.applyBindings(new ViewModel());
});














