Answers for "how to add custom label in list in lightning component"

1

get custom label in lightning component

$A.get("$Label.namespace.labelName")
Posted by: Guest on May-04-2020
0

how to add custom label in list in lightning component

<aura:attribute type="String[]" name="values" default="[]" access="private" />

({
  doInit: function(component, event, helper) {
    const values = [
      $A.get("$Label.c.MyLabel"),
      $A.get("$Label.c.MyLabel2"),
      $A.get("$Label.c.MyLabel3"),
      $A.get("$Label.c.MyLabel4"),
        /* ... */
    ];

    component.set('v.values', values);
 }
})
Posted by: Guest on November-18-2020

Code answers related to "how to add custom label in list in lightning component"

Browse Popular Code Answers by Language