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

127
Visualizações
Replace an Angular-material tag with an HTML tag using Javascript

I'm using an angular material tag which is <mat-label>. The problem is that this tag is not working properly when I try to generate a PDF file of the HTML code using the html2pdf library. I need to change it to <label> in order to make it work.

Is there any way to replace that tag dynamically with a javascript function?

This is what I'm trying to do, but I'm not sure if it is the right way. matLabel is not recognized as an HTML element:

Array.from(document.querySelectorAll('mat-label')).forEach((matLabel) => {
   const label = document.createElement('label')
   label.title = matLabel.title;
   matLabel.style.display = 'none'
   matLabel.parentElement.append(label)
})
about 4 years ago · Santiago Trujillo
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