Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

144
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda