使用 FireBug 打开我的应用程序时出现错误“声明未定义错误”。我正在使用 DOJO 框架并想开始编写代码。请帮我找出问题所在。
define(["dojo/_base/lang",
],
function (lang){
return declare ("app.Sample",{
testM : function test(){
alert('hi');
}
}
);
}
);
<html>
<head>
<link rel="stylesheet" href="src/dijit/themes/claro/claro.css" media="screen">
</head>
<script>
var dojoConfig = {baseUrl:"src" ,packages: [{ name: "dojo",
location: "dojo" },{ name: "dijit", location: "dijit" },{ name: "dojox", location: "dojox" },{ name: "app", location: "app"},],
parseOnLoad: true, useXDomain:true, async: true, debugAtAllCosts: true};
</script>
<script src="src/dojo/dojo.js"></script>
<body>
<script type="text/javascript">
require([
'app/Sample']);
</script>
</body>
</html>