我如何将翻译与* ngIf一起使用

时间:2020-06-04 19:15:43

标签: typescript ionic4

我有* ngIf,它比较两个值。这些值之一是翻译对象。

        <!-- <ion-item  *ngIf="findingForm[n].SelectOwnershipInput == 'GE Finding'"> -->

        <ion-item  *ngIf="findingForm[n].SelectOwnershipInput == '{{ 'AUDITFORMSUB.gefinding' | translate }}' ">
          <ion-button (click)="openGE(n)" expand="block" fill="outline">{{ 'AUDITFORMSUB.searchemployees' | translate }}</ion-button>
        </ion-item>

由于单引号内的单引号,此操作失败。反正我可以使用

{{ 'AUDITFORMSUB.gefinding' | translate }}

带有* ngIf

0 个答案:

没有答案
相关问题