开发者

Add bindings after calling ko.applyBindings

开发者 https://www.devze.com 2023-04-06 15:01 出处:网络
In KnockoutJS, is there any way to add bindings after开发者_开发技巧 calling ko.applyBindings?Turns out the answer to my question is the same as this one: Can you call ko.applyBindings to bind a parti

In KnockoutJS, is there any way to add bindings after开发者_开发技巧 calling ko.applyBindings?


Turns out the answer to my question is the same as this one: Can you call ko.applyBindings to bind a partial view?

ko.applyBindings accepts a second parameter, limiting the scope of binding to a specific element within the DOM. So as long as we know where the new bindings are located in the DOM, we can apply them separately afterwards.

0

精彩评论

暂无评论...
验证码 换一张
取 消