Dojo 1.7 how to use dojo components outside of require()
问题 I have created Dojo widget like below using AMD loader in Dojo 1.7.2 var myCpane; require([ "dijit/layout/ContentPane" ], function(ContentPane) { myCpane = new ContentPane(); }); myCpane.startup(); // It gives 'myCpane' as undefined In the above example, in the last statment, the variable 'myCpane' is coming as 'undefined', if I use the 'myCpane.startup()' inside the 'require()' callback function then, it will work fine. But I want to use that 'myCpane' variable on outside of the 'require'