使用离子翻译项目作为变量

Using ionic translate item as a variable

我是 Ionic 框架的新手,我想在 ng-if 条件下使用翻译项作为变量。 {{ "country" | translate }} 向我的页面显示一个值,但我想在以下条件下使用该值。

<div ng-if="country=='my country'"> This is my country </div>

但是我不知道怎么用, 谢谢

If 语句中使用离子转换:

<div ng-if="('country'|translate) == 'afghanistan'">
  This is Afghanistan
</div>