I am a little bit confused. Knowing that not all features which are available in a pure aura project are exposed to Lightning Components I thought it is mandatory to check against the Salesforce developer documentation.
So in the auradocs/reference.app below the JavaScript API section I found the function $A.set() giving this example:
$A.set("$Custom.something","new Value")
Unfortunately this does not work, giving me an error "Unable to set value for key". So my assumption is that I have to define a global value provider with the appropriate key first. When you search the Salesforce developer documentation against global value provider you get the first result showing up:
It seems that the search result is not within the scope of the Lightning Components as it does not show up in the navigation.
Does anyone have an idea how
- $A.set() is working
- I can add a custom global value provider or any other mechanism to store data in a manner known as Singleton
Thanks in advance
Chris
v.attribute
. That's the type of thing they'd also be using $A.set for as well. I'd think of it as being comparable to setting a general attribute for the life of a visualforce component.