function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Oliwia StrzelecOliwia Strzelec 

Lightning Component More Than One Expression In Paragraph

Hello,
I have one variable and want to display a few fields next to each other.
<a href="javascript:void(0);" class="slds-card__header-link slds-truncate" title="{!v.car.Name}">
   <p class="slds-text-heading_small">{! v.car.Name } {!v.car.Color__c} {!v.car.Brand__c}</p>
</a>
White spaces don't display in the paragraph, so I'm receiving that
C-0007GreenAudi
How can I make this to looks like that?
C-0007 Green Audi
Thanks in advance,
OS


 
Best Answer chosen by Oliwia Strzelec
Sankeerth ReddySankeerth Reddy
Hi Olivia,

This should work.
<p class="slds-text-heading_small">{! v.car.Name } &nbsp; {!v.car.Color__c} &nbsp;{!v.car.Brand__c}</p>


 

All Answers

Sankeerth ReddySankeerth Reddy
Hi Olivia,

This should work.
<p class="slds-text-heading_small">{! v.car.Name } &nbsp; {!v.car.Color__c} &nbsp;{!v.car.Brand__c}</p>


 
This was selected as the best answer
Oliwia StrzelecOliwia Strzelec
Great! Thanks :D