Dojo received a new loader in Dojo 1.7 to accommodate for the toolkit's new AMD module format. This new loader added a few new configuration options that are crucial to defining packages, maps, and more. For details on the loader, see the Advanced AMD Usage tutorial. Important loader configuration parameters include:
baseUrl: The base URL prepended to a module identifier when converting it to a path or URL
packages: An array of objects which provide the package name and location:
map: Allows you to map paths in module identifiers to different paths:
paths: a map of module id fragments to file paths:
async: Defines if Dojo core should be loaded asynchronously. Values can be true, false or legacyAsync, which puts the loader permanently in legacy cross-domain mode.
parseOnLoad: If true, parses the page with dojo/parser when the DOM and all initial dependencies (including those in the dojoConfig.deps array) have loaded.
deps: An array of resource paths which should load immediately once Dojo has loaded:
callback: The callback to execute once deps have been retrieved:
waitSeconds: Amount of time to wait before signaling load timeout for a module; defaults to 0 (wait forever):
cacheBust: If true, appends the time as a querystring to each module URL to avoid module caching::
Now let's create a simple demo that puts the basic parameters to use. One very common scenario is using Dojo Toolkit from CDN with local modules.
Let's say we use Google CDN with modules in the /documentation/tutorials/1.10/dojo_config/demo space:
y using the packages configuration, we've made all references to demo/* point to our local /documentation/tutorials/1.10/dojo_config/demo/ directory, while allowing any references to dojo, dijit, and dojox to come from Google CDN. Had the demo package not been defined, the request for demo/AuthoredDialog would have gone to //ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/demo/AuthoredDialog.js. We also used alias, by associating ready with dojo/domReady.
This dojo tutorial page provides you the following items dojo js tutorial , class dojo tutorial , dojo js , the dojo , dojo toolkit , learning dojo , dojo , what is a dojo , dojo programming , dojo javascript , dojo framework , define dojo , dojo require , dojo declare , dojo training , dojo xhr , dojo vs jquery , dojo examples , dojo application , dojo java , import dojo , dojo tree , dojo dom , call dojo , dojo ajax , dojo demo , dojo dojo , dojo json , dojo tutorial w3school , dojo widget , dojo full form , dojo jquery , dojo amd , dojo download , dojo library , dojo web , dojo tool , dojo build , coding dojo
Related Searches to Loader Configuration in dojo
dojo require exampledojo require external jsdojoconfig packagesdojo require error handlingdojo require vs definedojo modulepathsdojo loader multiple define errordojo.require is not a function