I have been reading and I can't seem to understand one part of the component - controller - helper - apex combo.
If I have a lightning component that is connected to an apex controller...I am confused how an attribute such as <aura:attribute name="ahg" type="object" />
would know any data. Where is it pulling the data from? What is the value of agh? I can see from a console.log that ahg has a value. I just don't understand how it is set.
Secondly, what is the value of parameters component, event, helper
in the lightning component's controller's function? Is the param component
the object? Is there an easy way to console.log() the event? Right now I get back [Object, Object]. When I: event.toString()
or console.dir()
I get back useless information.
My end goal is to get the value of a custom object's name and hid/display a div dependent on the value. I need to be able to see the values and know what I am playing with so that I can then pass the appropriate data to the apex controller (if needed).
Component
<aura:component controller="CommunityAccountListController" implements="forceCommunity:availableForAllPageTypes" access="global" >
<aura:attribute name="ahg" type="object" />
Controller
({
doInit : function(component, event, helper) {