【发布时间】:2015-11-17 19:36:42
【问题描述】:
在我的应用程序中,我尝试连接两个字符串:电子邮件和一些文本。
但我有一个麻烦,我需要可翻译的文本部分“即时”所以我写道:
$scope.textUnsubscribe = 'SUCESSFULL_UNSUBSCRIBE';
在视图中:
<h4 ng-bind-html="textUnsubscribe | translate"></h4>
当然可以(电子邮件+文本):
<h4 ng-bind-html="userEmail"></h4>
<h4 ng-bind-html="textUnsubscribe | translate"></h4>
但是我有样式错误...
我可以以某种方式将两个范围变量放入一个ng-bind-html 吗?一个是“静态的”,第二个是可翻译的?
喜欢:
<h4 ng-bind-html="userEmail, (textUnsubscribe | translate)"></h4>
【问题讨论】:
-
@Pierre-AlexandreMoller 忘记 css ......连接两个变量是真的吗?
标签: javascript angularjs translate