我以前做过,所以我一定是愚蠢的。你能看到我在这里做错了什么吗?
requirejs.config({
paths: {
'jquery': 'vendor/require-jquery',
'jquery-ui': 'vendor/jquery-ui-1.9.1.custom.min',
'modernizr': 'vendor/modernizr-2.6.1.min',
'nivoslider': 'vendor.nivo.slider.pack',
'chosen': 'vendor/chosen.jquery.min',
'backbone': 'vendor/backbone.min',
'underscore': 'vendor/underscore.min',
'consolefix': 'consolefix'
},
shim: {
'backbone': {
deps: ['underscore', 'jquery'],
exports: 'Backbone'
}
}
});
require(['jquery', 'modernizr', 'backbone'], function($, modernizr, Backbone) {
var model = Backbone.Model.extend();
console.log(model);
});
未捕获的类型错误:无法读取未定义的属性“模型”