define global variable in lightning component helper
Answers
Answered by
0
A global variable in the lightning component helper is defined as below:
initialize_Variables : func ( ) {
window.<NAME> = 'VALUE';
}
- In this way, a variable is defined in a Lightning controller and can be accessed in the JS file which is loaded from the static resource.
- Invoke the function of the lightning controller and write the above statement in that function before the loading of the JS file in which that particular variable will be used from the static resource
Answered by
0
Hope it helps you friend
Attachments:
Similar questions