angular - 如何翻译按钮的内容?
问题描述
我想在 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>
解决方案
你应该这样写
<input type="submit" [value]=" {{'1587' | t }}">
推荐阅读
- bash - 使用 Git 仅更新自身的 Bash 脚本
- regex - 在 Redshift 中检测汉字
- python - 不可变字典的可变包装器
- spring-boot - 已请求默认活页夹,但没有可用于“org.springframework.cloud.stream.messaging.DirectWithAttributesChannel”的活页夹
- java - Java:如何通过限制字符串中的字符数来分割带分隔符的字符串?
- flash - 允许自定义组件的 Flash/Animate 替代软件?
- c# - 是否可以禁用 ASP.NET Core 中的数据保护加密?
- node.js - 平铺编辑器 - 解码 Base 64 数据似乎不起作用
- python - 根据 Python 中的参考数据更正值
- python - 当使用 scipy_fftpack 的插入式 fft 替代品时,智慧是否在全球范围内存储?