I'm trying to translate a value in an input
. The input is disabled when I need to translate it so the user can't type text in the textbox. The data is inputted using ng-model
and currently looks like this:
<input ng-model="reason" ng-disabled="true" type="text" class="form-control" name="reason">
I've also tried the following:
<input ng-model="reason|translate" ng-disabled="true" type="text" class="form-control" name="reason">
<input ng-model="{{ reason | translate}}" ng-disabled="true" type="text" class="form-control" name="reason">
but none of them worked.
I could translate the value in the controller, but I'd like to do this in the html tags so the actual value on the scope doesn't get changed. How can I achieve this?