使用 WinJS 进行数据绑定与使用淘汰赛一样强大? [英] Databinding with WinJS as powerful as with knockout?

查看:23
本文介绍了使用 WinJS 进行数据绑定与使用淘汰赛一样强大?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始使用 HTML/CSS/JS 开发 Win8 应用程序.2 周后,出现了有关 WinJS 数据绑定的问题:

I have recently started to develop Win8 apps with HTML/CSS/JS. After 2 weeks a question regarding databinding with WinJS arose:

是否有可能通过 WinJS 执行数据绑定,就像使用Knockout.js(WinJS 能做所有的淘汰赛能做的事)?

Is it possible to perform databindings via WinJS as powerful as with e.g. knockout.js(Can WinJS do all the things knockout can)?

如果是这样,我将如何使用 WinJS 从淘汰赛中执行 ko.applyBindings()?

If so, how would I perform an ko.applyBindings()from knockout with just WinJS?

推荐答案

以下帖子中有两种方法的完整示例:

There is a complete example with both the two approaches at the following posts:

http://www.progware.org/Blog/post/Data-binding-in-Windows-8-Apps-with-Knockout.aspxhttp://www.progware.org/Blog/post/Data-binding-in-Windows-81-Apps-with-WinJS.aspx

这两种方法都应用于同一个 ViewModel,并且支持一切(双向绑定、转换器等).

Both methods are applied to the same ViewModel and everything is suppoorted (two way binding, converters etc).

这篇关于使用 WinJS 进行数据绑定与使用淘汰赛一样强大?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆