Closed rraziel closed 10 years ago
Hello,
The ng-i18next
directive sees the attribute's value as a string to translate. Please try following:
<a ng-class="{'someclass': $first}" ng-i18next="{{panel.id}}" ng-repeat="panel in panels"></a>
And if you want to have a translated title try this:
<a ng-class="{'someclass': $first}" ng-i18next="[title]{{panel.id}}" ng-repeat="panel in panels"></a>
Working example: http://jsbin.com/tulibevodeke/1/ In this example both of your examples work. All links should have a title based on their ID. ;)
Regards, Andre
Update:// Please let me know if I understood something wrong. :)
Ah yes, I tried again and it does work indeed... thanks :)
You're welcome :) You only forgot the braces around panel.id
.
I'm glad that I was able to help you.
Hello,
Maybe I'm using the directive wrong, but simple example:
This doesn't apply "someclass". Simply removing the ng-i18next attribute fixes it. Right now I'm doing this as a workaround: