get custom label in lightning component
$A.get("$Label.namespace.labelName")
get custom label in lightning component
$A.get("$Label.namespace.labelName")
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);
}
})
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us