AnsweredAssumed Answered

Custom module not loading

Question asked by pvitt on Aug 9, 2013
Latest reply on Aug 19, 2013 by pvitt
Hi - I'm trying to use a custom module with the esri javascript library and an object expected error gets thrown on the require function:  It works just fine when I use "http://ajax.googleapis.com/ajax/libs/dojo/1.8.5/dojo/dojo.js" instead of js.arcgis.com/3.6/.  Any ideas what I'm doing wrong?

Thanks

<script
data-dojo-config="
        async: true,
       packages: [ {
            name: 'custom',
            location: location.pathname.replace(/\/[^/]+$/, '') + '/Scripts/custom'
        } ]"
        src="js.arcgis.com/3.6/">
</script>
</head>
<body class="claro">
    <div id="grid"></div>
    <script>

        require(["custom/ModTest"], function (ModTest) {
            ModTest.increment();
            var test = ModTest.getValue();
        });
       
    </script>
</body>

Outcomes