Knockout 是个JavaScript library,帮助创建丰富的显示和编辑器UI,通过干净的底层数据模型。你可以在任何时候动态更新UI的选择部分。
Knockout.js 3.2.0 正式发布,更新内容如下:
组件
组件提供更好的可伸缩方式构建大型应用:
Combine a viewmodel and template in an encapsulated package
Can represent either small reusable widgets or entire sections/pages in a larger app
Can be preloaded, or loaded on demand
Can be nested or inherited
Can work with custom conventions for configuration or loading.
更多请看: 组件概览文档。
定制元素
Custom elements provide many of the benefits of the emerging Web Components spec, but cleanly integrated with KO’s new components feature described above. Plus, they’re ready to use in production today – compatible all the way back to IE6!
更多请看:custom elements documentation
Pure computeds
ko.computed 一直是 KO 的强大动力,支撑 KO 的所有特性,它能让你的代码不用显式声明任何的依赖项。
ko.pureComputed 是 ko.computed 新规范,在许多事件上有更好的性能和内存管理。
更多内容请看: pure computed documentation
文本输入绑定
这个新的绑定解决了大量浏览器关于文本输入的怪异事件。
代码检出:https://github.com/knockout/knockout