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

167
Vistas
How do I pass an i18n value to a function through a "click" event?

I can't provide much example code. I'm unable to paste the code I'm working with for reasons of confidentiality, and I'm too new to Angular to be able to produce a minimum working example.

I have a button with a click element and an i18n element:

<button type="button"
    (click)="myFunction('temporaryValue')"
    i18n="@@nonEnglishText">
        English Text
</button>

What I aim to do is replace temporaryValue in the click element with the value of i18n, but I don't know how to achieve this. I tried the following method, but it sends the string itself instead of the value it's supposed to refer to:

(click)="myFunction('@@nonEnglishText')"

I also tried the following method, but it doesn't work:

i18n-(click)="myFunction('@@nonEnglishText')"

How do I achieve sending the correct value to the function?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can't ,you have to translate the temporaryValue somewhere else , where do you store-it or how do you get the value ?

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