I am working on an AngularJS application with Angular -Translate 2.6.1. I have a span with the title attribute to be translated, but it should also display a variable.
<span title={{'translationID'|translate:'{username:"Value"}'}}>...</span>
I tried to replace the "Value" value with {{Value}} with and without quotation marks. The value is defined in the scope, and I can access it with {{Value}} outside the filter.
The only luck I've had so far with changing variables in Angular-Translate is using the translate directive
(e.g. <span translate="translationID" translate-value-username="{{Value}}">...</span> ),
but it doesn't seem to be an option. Is it possible to replace variables in the filter, how is this possible, or do I need to find another solution?
EDIT: For readability, here is the solution:
<span title="{{'translationID'|translate:{username:Value} }}">...</span>
javascript html angularjs angular-translate
Tirenoth
source share