I need set a custom style of dynamics div. Div are conforms to the balise :
<div class="row">
<div id={{'letter'+$index}} ng-style="{{theStyle}}" class="col"
ng-repeat="letter in letters track by $index">{{letter}}
</div>
</div>
The color of each letter must be defined in function of a level and by the value of the index that are declared in an array. I have three levels (low, medium, high), so the low-style, the medium-style and the high-style. The array can be for example: ['color': 'white', 'border-color': 'blue', ..., 'color': 'white', 'border-color': 'red']. For each letter there are an element of the array.
Could you suggest a smart solution for this case ?
Thanks
EDIT: The variables used in the controller are:
var word = getWord(objectWord, getLanguage());
$scope.letters = word.split('');
$scope.level = getLevelCSS(getLevel());
var arrStyles = getStyles(letters.length);
lettersarray.