Reputation: 1747
It is easier to display this than explain it. I am trying to do this...
<div ng-repeat="label in itemLists">
<input id="{{label}}" type="checkbox">
<label for="{{label}}">{{'food.items.{{label}}' | translate}}</label>
</div>
The translate with the {{label}} is the issue. If I use food.items.cheese it works.
and inside of itemLists is
['lettuce', 'cheese', etc...]
food items is
{
"lettuce": "Lettuce",
"cheese": "American Cheese",
etc...
}
Upvotes: 2
Views: 124
Reputation: 6124
You can't have {{}} inside of {{}}.
How about 'food.items.' + label
?
Upvotes: 1