I am using Knockout JS to create an editor. I am using the foreach property to loop around a list in my model.
-
I wanted to post as a comment, but my reputation is too low...
Thank you very much RP Niemeyer for your post.
I don't know if this has something to do with requirejs and knockout modules, but I had to change
ko.bindingHandlers.uniqueName.currentIndex
to
ko.bindingHandlers.uniqueName.Zb
so now I have:
define(["knockout"], function(ko) {
ko.bindingHandlers.valmsg = {
init: function (element) {
element.setAttribute("data-valmsg-for", "ko_unique_" + ko.bindingHandlers.uniqueName.Zb);
}
};
});
- 热议问题