【发布时间】:2012-04-25 15:06:59
【问题描述】:
我有一个 Backbone 视图作为 requirejs 模块。问题是 requirejs 在视图初始化之前加载了http://localhost/remote/script/here.js。是不是因为脚本不在 requirejs 模块中?
define([
'jquery',
'undescore',
'backbone',
'http://localhost/remote/script/here'
], function($, _, Backbone, Luajs){
var View = Backbone.View.extend({
initialize : function(options) {
},
render : function() {
this.$el.html('<p>my view</p>')
return this;
}
});
return View;
});
【问题讨论】:
标签: backbone.js requirejs