1
我是新来的Dojo和想不通为什么会这样在Dojo中加载模块变量?
在dojo.html:
在a.jsdefine([], function() {
var a = {
"sheep": "blah",
}
return a;
});
要求和加载模块
require(["dojo/query", "dojo/NodeList-dom", "dojo/domReady!", "a" ], function(query, a) {
query("#greeting").style("color", "red");
alert(a.sheep);
});
很好,但是当我尝试提醒a.sheep时,我得到了不确定。 注意:我也尝试过申报羊:“blah”,并尝试将羊改为alert函数并运行a.sheep;哪些工作。