Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

244
Views
Empty spaces added around HTML text when using Angular interpolation

Any idea why an empty space is added before text in HTML when using interpolation in Angular?

Exemple in my Angular HTML template:

<div class="info-title">
   {{ "Beds" }}
</div>

Result after ng serve:

<div _ngcontent-bej-c49="" class="info-title"> Beds </div>

You can see that some spaces are added before and after Beds.

Do you have any idea of what I could do to prevent those spaces from appearing?

This is an exemple and I'm aware that there's no need to use an interpolation here.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Remove the whitespace before and after the JavaScript.

<div class="info-title">{{ property.bedAmount > 1 ? "Beds" : "Bed" }}</div>
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!