multiple requires in a single line

333
1
07-09-2012 07:53 AM
NigelAlford
New Contributor III
In using 1.7 dojo they call multiple items in a single call. But when I try this under the ArcGIS api it blows the app up. is this common or am I making a coding error:

dojo.require([ "dojo.parser", "dojo.domReady", "esri.map"]);



VS.

 dojo.require("dojo.parser");
 dojo.require("dojo.domReady");
 dojo.require("esri.map");
0 Kudos
1 Reply
derekswingley1
Frequent Contributor
It looks like you're confusing the use of require and dojo.require. The former is the new, AMD style of loading modules and accepts and array of strings (and then passes them to an optional callback once all modules are loaded). The latter is the legacy way of loading modules and takes a single string argument.
0 Kudos