Reputation: 6852
I am trying to make some translation in Angular on translate pipe like this
{{editableLinks ? 'Shared.Edit' : 'Shared.Details' | translate}}
But it does not works it always simple string like translate pipe is not bind? Any one got similar problem with translate pipe?
Upvotes: 1
Views: 316
Reputation: 3203
Believe me or not, this should work:
{{(editableLinks ? 'Shared.Edit' : 'Shared.Details') | translate}}
Let the condition happen first and use resulting string as a translate key. Same applies when you use async
Upvotes: 3