ko-promise:Knockout Observable Promise

时间:2021-07-06 20:36:00
【文件属性】:
文件名称:ko-promise:Knockout Observable Promise
文件大小:9KB
文件格式:ZIP
更新时间:2021-07-06 20:36:00
JavaScript ko.promise - 可观察的承诺 目的 这个库的目的是规范 observables 和 promises 之间的 API 表面,允许它们在你的应用程序中互换使用。 这简化了将异步调用绑定到您的视图的过程,而无需显式等待 promise 的解析。 例子: function vm ( ) { // the jQuery ajax call will return a promise derivative, // which will be turned into an observable that is set when the promise is resolved this . asyncResource = ko . promise ( $ . ajax ( "external/url" ) ) ; this . normalValue = ko . observa
【文件预览】:
ko-promise-master
----.gitattributes(483B)
----gruntfile.js(1015B)
----bower.json(534B)
----ko-promise.min.js(2KB)
----README.md(6KB)
----ko-promise.js(5KB)
----tests()
--------runner.html(728B)
--------tests.js(7KB)
----.gitignore(145B)
----package.json(672B)

网友评论