function DatesViewModel(){ var self = this;
self.dates = ko.observableArray();
...
... self.ajax(self.datesURI, 'GET').done(function(data) {
for (var i = 0; i < data.dates.length; i++) { alert(i + "\n" + data.dates[i].date + "\n" + data.dates[i].strAbsent); self.dates.push({ date: ko.observable(data.dates[i].date), strAbsent: ko.observable(data.dates[i].strAbsent) }); } }); }
ko.applyBindings(new DatesViewModel(), $('#main')[0]);
--
You received this message because you are subscribed to the Google Groups "KnockoutJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knockoutjs+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--