July 2018
Beginner to intermediate
458 pages
9h 58m
English
The Utility Bar sits in the footer of the screen and provides an extensive set of APIs. To use the Utility Bar, the Lightning Component needs to use a special component named Lightning :utilityBarAPI. The following code shows a sample component code snippet that uses this API component:
<aura:component implements="flexipage:availableForAllPageTypes" access="global" > <Lightning :utilityBarAPI aura:id="utilitybar" /> <Lightning :button label="Get All Utility Info" onclick="{! c.getAllUtilityInfo }" /></aura:component>
The controller code that can call all the functions is as follows:
({ getAllUtilityInfo : function(component, event, helper) { var utilityAPI = component.find("utilitybar"); utilityAPI.getAllUtilityInfo().then(function(response) ...