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

290
Views
no se puede llamar a la función javascript desde el componente angular 13

Hay un cambio reciente introducido en Angular 13 donde la forma anterior de llamar a funciones de javascript desde componentes angulares ya no funciona.

Tengo un problema al llamar a una función de JavaScript desde un componente específico.

Ya probé de la manera habitual y aquí está mi enfoque.

ARCHIVO: src\assets\js\main.js

 (function($) { "use strict"; function animatedProgressBar () { $(".progress").each(function() { var skillValue = $(this).find(".skill-lavel").attr("data-skill-value"); $(this).find(".bar").animate({ width: skillValue }, 1500, "easeInOutExpo"); $(this).find(".skill-lavel").text(skillValue); }); } })(jQuery);

ARCHIVO: src\app\about-me\about-me.component.ts

 import { Component, OnInit } from '@angular/core'; declare function animatedProgressBar(): any; @Component({ selector: 'app-about-me', templateUrl: './about-me.component.html', styleUrls: ['./about-me.component.css'] }) export class AboutMeComponent implements OnInit { //declare animatedProgressBar: any; constructor() {} ngOnInit(): void { animatedProgressBar(); } }

Este fragmento de código arroja un error: ERROR ReferenceError: animationProgressBar no está definida

Revisé la respuesta en este tema de StackOverflow pero no funcionó para mí.

Esperando algunos aportes valiosos sobre este tema.

about 4 years ago · Juan Pablo Isaza
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!