I am using JavaScript module pattern in my application.
Here is my html binding
<a href="#" data-bind="visible:master.child.showDeleteLink,click: function(obj, event)
{ master.child.showDeletePopup() } ">
My view modal is
master.child=(function (my, jQuery, ko) {
var textTemp;
my.ViewModel = function () {
self.showDeleteLink = ko.observable();
self.showDeleteLink = function () {
if (textTemp.length > 500)
return true;
else
return false;
}
ko.applyBindings(my.anothermodule);
}
}(master.child, $, ko));
Click binding, html are text are working pretty fine :).
But visiblity binding is not working.any body have any idea? am i wrong any where?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…