1

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 ?

3 Answers 3

4

What about this:

{{(point.localized ? 'CHECKED' : 'I_AM_HERE') | translate }}
Sign up to request clarification or add additional context in comments.

Comments

2

Try this:

{{point.localized ? ('CHECKED' | translate) : ('I_AM_HERE' | translate)  }}

Comments

0

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>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.