<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic esri/config questions in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-config-questions/m-p/61912#M5420</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to wrap my head around how the esri/config class works. I noticed a module in our application that sets a esriConfig.defaults.map property but esri/config is not required in that module. I put a breakpoint on my first line of javascript once the DOM is ready to watch esriConfig. The default properties of esriConfig are set but I haven't explicitly required the class anywhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To confirm that I wasn't requiring the class elsewhere and it somehow being in scope, I went to the other module or two that were requiring esri/config and removed the reference. Surely, esriConfig would be undefined now, right? Nope, the default properties exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I review the documentation and discover this: "When coding legacy (non-AMD) style, there is no need to require the module. All methods and properties are available in the namespace." &lt;A href="https://developers.arcgis.com/javascript/jsapi/esri.config-amd.html"&gt;https://developers.arcgis.com/javascript/jsapi/esri.config-amd.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using 3.14 and AMDs. So, it would seem that I would have to require it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should esriConfig be required before setting/getting properties in a custom module?&lt;/P&gt;&lt;P&gt;How is esriConfig global?&lt;/P&gt;&lt;P&gt;Is esriConfig supposed to be global?&lt;/P&gt;&lt;P&gt;Should it be global?&lt;/P&gt;&lt;P&gt;Am I doing it wrong?&lt;/P&gt;&lt;P&gt;Why does the documentation imply that only legacy code requires requiring of esri/config?&lt;/P&gt;&lt;P&gt;Are there any other global classes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Oct 2015 16:30:30 GMT</pubDate>
    <dc:creator>TyroneBiggums</dc:creator>
    <dc:date>2015-10-22T16:30:30Z</dc:date>
    <item>
      <title>esri/config questions</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-config-questions/m-p/61912#M5420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to wrap my head around how the esri/config class works. I noticed a module in our application that sets a esriConfig.defaults.map property but esri/config is not required in that module. I put a breakpoint on my first line of javascript once the DOM is ready to watch esriConfig. The default properties of esriConfig are set but I haven't explicitly required the class anywhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To confirm that I wasn't requiring the class elsewhere and it somehow being in scope, I went to the other module or two that were requiring esri/config and removed the reference. Surely, esriConfig would be undefined now, right? Nope, the default properties exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I review the documentation and discover this: "When coding legacy (non-AMD) style, there is no need to require the module. All methods and properties are available in the namespace." &lt;A href="https://developers.arcgis.com/javascript/jsapi/esri.config-amd.html"&gt;https://developers.arcgis.com/javascript/jsapi/esri.config-amd.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using 3.14 and AMDs. So, it would seem that I would have to require it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should esriConfig be required before setting/getting properties in a custom module?&lt;/P&gt;&lt;P&gt;How is esriConfig global?&lt;/P&gt;&lt;P&gt;Is esriConfig supposed to be global?&lt;/P&gt;&lt;P&gt;Should it be global?&lt;/P&gt;&lt;P&gt;Am I doing it wrong?&lt;/P&gt;&lt;P&gt;Why does the documentation imply that only legacy code requires requiring of esri/config?&lt;/P&gt;&lt;P&gt;Are there any other global classes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 16:30:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-config-questions/m-p/61912#M5420</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2015-10-22T16:30:30Z</dc:date>
    </item>
  </channel>
</rss>

