什么是require.js加载映射插件的标准方式?
下面是我的config.js(require.js配置文件)
require.config({
// Initialize the application with the main application file.
deps: ["app"],
paths:{
// JavaScript folders.
libs: "lib",
plugins: "lib/plugin",
templates: "../templates",
// Libraries.
jquery: "lib/jquery-1.7.2.min",
underscore: "lib/lodash",
text: 'text',
order: 'order',
knockout: "lib/knockout",
knockoutmapping: "lib/plugin/knockout-mapping"
},
shim:{
underscore:{
exports: '_'
},
knockout:{
deps: ["jquery"],
exports: "knockout"
}
}
}
在我看来模型
define(['knockout', 'knockoutmapping'], function(ko, mapping) {
}
然而,映射未绑定到ko.mapping。 任何指针/建议将不胜感激。
谢谢你,拉维