Dynamically appending translated text in Angular

Discussão em 'Angular' iniciado por user10828808, Novembro 21, 2024.

  1. user10828808

    user10828808 Guest

    I am using ngx-translate ,I have a link in Angular whose text value will be dynamic and should be translated, For example it should be of format 'Hello XYZ', 'Hello ABC' ,How can I pass params in the HTML template like 'ABC' and 'XYZ' such that link will be 'Hello ABC' and 'Hello XYZ' respectively.


    <div class="parent">

    <a class="link">

    {{ MYCONSTANTS.HELLO | translate}}

    </a>

    </div>

    Here MYCONSTANTS.HELLO will have value 'Hello'

    Continue reading...

Compartilhe esta Página