dojo - dojo tutorial Load DojoConfig in dojo - coding dojo - dojo examples



In Below sample we are creating one global javascript object dojoConfig which will contain all the configuration values.

Note: dojoConfig is defined in a script block before dojo.js is loaded. This is of paramount importance—if reversed, the configuration properties will be ignored.
<script>
    dojoConfig= {
        has: {
            "dojo-firebug": true
        },
        parseOnLoad: false,
        foo: "bar",
        async: true
    };
</script>
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js"></script>

<script>
// Require the registry, parser, Dialog, and wait for domReady
require(["dijit/registry", "dojo/parser", "dojo/json", "dojo/_base/config", "dijit/Dialog", "dojo/domReady!"]
, function(registry, parser, JSON, config) {
    // Explicitly parse the page
    parser.parse();
    // Find the dialog
    var dialog = registry.byId("dialog");
    // Set the content equal to what dojo.config is
    dialog.set("content", "<pre>" + JSON.stringify(config, null, "\t") + "```");
    // Show the dialog
    dialog.show();
});
</script>

<!-- and later in the page -->
<div id="dialog" data-dojo-type="dijit/Dialog" data-dojo-props="title: 'dojoConfig / dojo/_base/config'"></div>

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 Load DojoConfig in dojo