I have a similar question as these ones :
How to ng-translate inside select box option in angularjs
angular-translate ad ng-options
But my case is a bit different. I would like that my ng-option fill up automatically with elements from a list in my json. And I would like to avoid defining these elements in my controller (because otherwise each time an element is added to the list I will need to add them in my controller manually).
Here is the concerned part in my .json :
"availLanguages" : [
"Deutsch",
"English",
"Français"
],
My controller's instance is called "language". So I've tried the followings :
<select ng-options="language for languages in 'availLanguages' | translate" ng-model="language.selectedLanguage" ng-change="language.changeLanguage()"></select>
Thanks,
EDIT: here's the result :
Each object is a letter from "availLanguages".