I have an old angularjs app and need some text translated where the language key might or might not have existing translation so I need to provide a default text to show. I am using the translate directive.
I have tried this variant that I found example of another place, but this does not work.
<span translate="connectionPointType_{{typeCode}}" translate-default="{{typeCode}}"></span>
I need this to show the value of typeCode if the corresponding language key does not exist.
Example:
$scope.typeCode = 'XYZ'
In this case the language key will be connectionPointType_XYZ. But this does not exist as a language entry, so I want the text XYZ to be shown. Currently, the translate service returns just the key as default, which in this case is connectionPointType_XYZ.
So my question is: does the old angularjs version support something like this?