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

124
Views
Angular 12: c.getComputedStyle no es una función

Estoy usando la nueva librería dom-to-image y me encuentro con este error cuando trato de llamar al método toPng dentro de un componente.

 import domtoimage from 'dom-to-image-more'; export class MyComponent { @ViewChild('leafletMap') leafletMap: ElementRef; downloadMap = (): void => { //error happens here domtoimage.toPng(this.leafletMap.nativeElement).then((img: any) => { console.log(img); }); }; } /* of course this is simplified */

El leafletMap existe en mis componentes HTML y cuando lo registro, contiene un HtmlNativeElement

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

0

Parece que hay un problema con la última versión de lib. Intenta usar esta versión:

 "dom-to-image-more": "2.8.0"

Creé un StackBlitz que funciona, haga clic en el botón de descarga y vea el resultado.

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!