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

141
Views
Angular add HTML element to dynamically created HTML element

I have dropdown with items lets say.

<customDropdown>
   <item label="ITEM1"></item>
   <item label="ITEM2"></item>
   <item label="ITEM3"></item>
</customDropdown>

This dropdown created new div with class for each item. Problem is that I need to add button to items but because is custom dropdown I can pass value only through label which is string. Basically I need to do something like
<item label="<button>DELETE</button>ITEM1></item>"
But I cant because its automatically converted to string.

Thanks for any ideas.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

which library are you using? its not possible to pass html element through attribute like that. if your library allows you to do such thing its either using <ng-content> ( and if that is the case your implementation would be : <item> <button> delete </button> </item>) or using custom templates.

about 4 years ago · Juan Pablo Isaza 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!