Lightning: $A

$A is known as the Aura object. Aura object is top level object in javaScript framework code.

Usage of $A

// Find a component where you wan to apply the util
var myAttr = component.find("myAttr"); 
$A.util.addClass(myAttr, "add-class");

Can be used with –

getBooleanValue
hasClass
isArray
isEmpty
isObject
isUndefined
isUndefinedOrNull
removeClass
toggleClass

More reference can be found on – https://na15.lightning.force.com/auradocs/reference.app

Leave a Reply

Your email address will not be published.