email address in Angular i18n string

458 Views Asked by At

I'm adding a internationalized message to the footer of an AngularJS page, including an email address - For additional help, please send an email to [email protected] This is added to the relevant js i18n files as

"helpnote": "For additional help, please send an email to mailto:[email protected]"
"helpnote": "Para obtener ayuda adicional, por favor envíe un correo electrónico a mailto:[email protected]"
"helpnote": "Pour une aide supplémentaire, se il vous plaît envoyez un courriel à mailto:[email protected]"

etc

unfortunately the mailto link appears as text if I use

 <div class="helpnote">{{i18n.helpnote}}</div>

i.e. this exact string appears on screen - "For additional help, please send an email to mailto:[email protected]"

Can the internationalized string be written, or bound to the div, in such a way that the link becomes active?

1

There are 1 best solutions below

1
On BEST ANSWER

Use either ng-click on the div to make it avtive somehow and do the redirection in the controller using $location perhaps ( if there is more magic behind your action ) or simply create regular link with ng-href.

https://docs.angularjs.org/api/ng/directive/ngHref