Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <aura:component implements="flexipage:availableForAllPageTypes" access="global">
- <!-- attributes -->
- <lightning:utilityBarAPI aura:id="utilitybar" />
- <aura:attribute name="hasUtilityBar" type="Boolean" default="false" />
- <!-- event handlers -->
- <aura:handler name="init" value="{! this }" action="{! c.init }" />
- <p>Is there a utility bar? {! v.hasUtilityBar ? 'Yes' : 'No' }</p>
- </aura:component>
- ({
- init: function (component, event, helper) {
- var utilityAPI = component.find('utilitybar');
- utilityAPI.getAllUtilityInfo().then(function (response) {
- if (typeof response !== 'undefined') {
- component.set('v.hasUtilityBar', true);
- } else {
- component.set('v.hasUtilityBar', false);
- }
- });
- }
- });
Add Comment
Please, Sign In to add comment