The right way:
<input type="number" placeholder="{{ (constraint ? 'TERM_A' : 'TERM_B') | translate }}" ng-model="" required autocapitalize="none" autocorrect="off" />
One more example:
label="{{ (detailsTriggered ? 'ui.showDetails' : 'ui.hideDetails') | translate}}"
Beware of the "[]" braces, quotation marks, and apostrophes.
source share