我已經創建了一個小部件,我想通過AMD在dojo 1.7中加載。我希望能夠將我的自定義小部件庫放在與dojo文件夾相同的級別上。AMD使用Dojo 1.7加載小部件1.7
它看起來總是使用dojo的基本路徑,所以需要在dojo文件夾中放置小部件,但dojo附帶的lib並不需要遵循該規則,例如dijit和dojox。
我試圖改變的基本路徑和
<script>
dojoConfig = {
isDebug: true,
parseOnLoad: true,
async:true
//,baseUrl: '../src/js'
};
</script>
<script type="text/javascript" src="js/dojo/dojo.js"></script>
<script type="text/javascript">
console.log('start1');
require(
["dojo/ready"
,"dijit/Tree"
,"screeningResults/ScreeningResults"
],
function(ready,tree, screening){
var screeningUI = new screening({}, "screeningUI");
screeningUI.startup();
}
);
</script>
您需要告訴我們您的目錄是如何組織的。 – hugomg