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

125
Vistas
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 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