Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

142
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda