Reputation: 1519
Hello I can't find the way for doing this correctly :
{{point.localized ? "{{ 'CHECKED' | translate }}" :"{{ 'I_AM_HERE' | translate }}" }}
point.localized is a boolean and if it's true I want to display the translation for checked and if it's not the translation for I_AM_HERE how can I do this ?
Upvotes: 1
Views: 47
Reputation: 6280
Try this:
{{point.localized ? ('CHECKED' | translate) : ('I_AM_HERE' | translate) }}
Upvotes: 2
Reputation: 5977
Or the long way around, which is still valid:
<div ng-if="point.localized">
<span>{{'CHECKED' | translate"}}</span>
</div>
<div ng-if="!point.localized">
<span>{{'I AM HERE' | translate"}}</span>
</div>
Upvotes: 0
Reputation: 3080
What about this:
{{(point.localized ? 'CHECKED' : 'I_AM_HERE') | translate }}
Upvotes: 4