You need to sign in to do that
Don't have an account?
Ayan Sarkar
Calling a static resource resource javascript functoin from lightning component
I have a static resource named as 'geoCode' it has a function as below function callMe(){ alert('You are inside static resource'); }
I want to call this function from lightning component controller and expecting an alert message on screen.
What is the way out? please help me fast..
I want to call this function from lightning component controller and expecting an alert message on screen.
What is the way out? please help me fast..
To reference a JavaScript library that you’ve uploaded as a static resource, use a <ltng:require> tag in your .cmp or .appmarkup.
<ltng:require scripts="/resource/resourceName" afterScriptsLoaded="{!c.afterScriptsLoaded}" />
Thanks
Sandeep Singhal
http://www.codespokes.com/
HI Sandeep.
thats what I did. I called the function from the controller function
afterScriptsLoaded.. But an internal error is flashed saying that no such function as 'callMe()' has been declared.