<aura:attribute name="string" type="String" />
<lightning:dualListbox name="Mainoptions"
                               label= "Select options from "
                               sourceLabel="Main Options"
                               selectedLabel="Selected"
                               fieldLevelHelp="Select one or more"
                               options="{!v.options}"
                               onchange="{! c.handleMainoptions }"/>

I got Lightning dualListBox.... Is it possible to put Attribute value into the label?I tried label= "Select options from {!v.string}" and its not possible. Is there any way to do that?

Thanks for helping!

up vote 4 down vote accepted

You need to append it eg:label= "{!'Select options from '+ v.string}"

<aura:attribute name="string" type="String" default="asds"/>
<lightning:dualListbox name="Mainoptions"
                               label= "{!'Select options from '+ v.string}"
                               sourceLabel="Main Options"
                               selectedLabel="Selected"
                               fieldLevelHelp="Select one or more"
                               options="{!v.options}"
                               onchange="{! c.handleMainoptions }"/>

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.