首页 > 解决方案 > 如何翻译按钮的内容?

问题描述

我想在 Angular 中翻译一个按钮。

问题是翻译不在我的按钮中,而是在外面。

我还有第二个问题,

这是一个例子:

在此处输入图像描述

我认为问题出在这里?

<input type="submit"

这是代码

<p class="step3 help-3" style="top: 178px; position: relative; float: right;">
   <span class="inputButtons medium">
    <input type="submit" (click)="goToFase(2)" *ngIf="fase == 1" style="width: 200px;margin-top: 0px !important;">
        {{'1587' | t }}
   
   </span>
</p>

标签: angular

解决方案


你应该这样写

<input type="submit" [value]=" {{'1587' | t }}">


推荐阅读