I have an attribute declared in component.
<aura:attribute name="ifTrue" type="Boolean" default="False" description="Boolean show records." />
I am setting the value to it from a function in helper.js
component.set('v.ifTrue', searchItem.includes('FTP'));
Now I'm trying to access the value from component. I alreday set value to true and am expecting to see "True" when I use console.log in helper in other function.
console.log('ifTrue Value>>:'+{!ifTrue});
It gives me format issues while debugging. I tried other formats like {!V.ifTrue}
, "{!v.ifTrue}"
, ifTrue
etc. But I get errors.
What is the correct format to access attribute on helper. When I use "{!v.ifTrue}"
similar to in component.set();
, it gives me the string {!v.ifTrue}
in debug.