想知道是否可以在同一功能范围内同时使用定义和要求。通常是需要或定义,我如何在同一范围内拥有两者?
define(["my/cart", "my/inventory"],
function(cart, inventory) {
//Define foo/title object in here.
}
);
require(["some/module", "a.js", "b.js"], function(someModule) {
//This function will be called when all the dependencies
//listed above are loaded. Note that this function could
//be called before the page is loaded.
//This callback is optional.
});