AnsweredAssumed Answered

Write a normal JavaScript function in AMD module.

Question asked by sanjayjadhav on Feb 9, 2015
Latest reply on Feb 11, 2015 by sanjayjadhav

Hello,

 

I know this question is regarding pure Dojo but still I'm asking for help because I have just started to learn JavaScript API.

 

In a custom AMD Dojo module,we write a module function like below and we call it from somewhere.

 

addMapService:function(url,mapControl){            //add map service  }, 

 

However, I want to know how we go about writing a normal Javascript function in AMD module as below;

 

function addMapService(url,mapControl){            //add map service  }

 

The reason I'm asking this, we need lot of private helper functions in AMD module,so instead of creating another helper AMD module,I'm looking for a way to write the normal JavaScript function in a module itself.

 

Cheers,

S.

Outcomes