Anyone else ever have issues where knockout doesn't seem to be doing a 2-way data-bind?
I've got a text field i'm making changes to and trying to capture the value after a button click and the new value doesn't seem to be changing...
I've dumbed this down but still seems like it's not doing what I want.
//summary.js
define(function (require) {
var system = require('durandal/system');
var app = require('durandal/app');
var self = this;
self.dueStart = ko.observable();
self.dueEnd = ko.observable();
self.testData = function () {
system.log(self.dueStart());
};
return {
activate : function(context) {
self.dueStart('12/1/2012');
return true;
}
};
});
//summary.html
<input id="dueStart" name="dueStart" type="text" data-bind="text : dueStart" />
<button data-bind="click: testData">Filter</button>
if I change the contents of the textbox "dueStart" and click filter... the functoin runs, yet the system.log still returns 12/1/2012... data hasn't changed at all...
something seems screwy... any ideas?