ko.mapping 未定义
我正在遵循这个示例 http://jsfiddle.net/rniemeyer/badZb/ 。我只是将确切的代码复制并粘贴到示例应用程序中,它给了我这个错误:“ko.mapping is undefined”。有人知道发生了什么事吗?我的 ko.observable 和 dependentObservable 工作得很好,只是 ko.mapping 不起作用。
仅供参考:knockout.js 版本是 2.0 和 Jquery 1.7.1
im following this example http://jsfiddle.net/rniemeyer/badZb/ . I just copy and paste the exact code into a sample application and it gave me this error : "ko.mapping is undefined" . Anyone know whats happening? My ko.observable and dependentObservable are working great, is just that ko.mapping is not working.
FYI : The knockout.js version is 2.0 and Jquery 1.7.1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于映射插件正是一个插件,因此它不包含在核心库中。
您需要单独包含映射插件。您可以在 GitHub 上找到它。只需确保在包含核心 Knockout 库之后包含它即可。
As the mapping plugin is exactly that, a plugin, it is not included in the core library.
You need to include the mapping plugin separately. You can find it on GitHub. Just make sure you include it after including the core Knockout library.