Angular i18n 字符串中的电子邮件地址

email address in Angular i18n string

本文关键字:电子邮件地址 字符串 i18n Angular      更新时间:2023-09-26

我正在向 AngularJS 页面的页脚添加国际化消息,包括电子邮件地址 - 如需其他帮助,请发送电子邮件至 help@email.com这被添加到相关的 js i18n 文件中,作为

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

不幸的是,如果我使用 mailto 链接显示为文本

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

即这个确切的字符串出现在屏幕上 - "如需其他帮助,请发送电子邮件至 mailto:help@email.com"

国际化字符串是否可以以链接变为活动状态的方式写入或绑定到div?

使用 ng

单击div 以某种方式使其具有活力,并使用 $location 在控制器中进行重定向(如果您的操作背后有更多魔力)或简单地使用 ng-href 创建常规链接。

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