我不明白我做错了什么。我正在尝试在我的应用程序中使用 Backbone LayoutManager,下面的简单代码会导致错误:'无法调用未定义的方法'绑定''
这是我的 main.js 文件:
require.config({
paths: {
jquery: 'libs/jquery',
underscore: 'libs/underscore',
backbone: 'libs/backbone',
layoutManager: 'libs/backbone.layoutmanager',
knockout: 'libs/knockout',
templates: '../templates'
},
shim: {
backbone: {
deps: ['jquery','underscore'],
exports: 'Backbone'
},
layoutManager: {
deps: ['jquery','underscore', 'backbone'],
exports: 'LayoutManager'
}
}
});
require([
'app',
'backbone',
'layoutManager'
], function(App, Backbone, LayoutManager) {
// Set all Views to be managed by LayoutManager.
Backbone.Layout.configure({ manage: true });
App.initialize();
});
知道是什么导致了这个错误吗?