JSFiddle - React, Tailwind, and code Playground

by paislee

HTML

<div ng-app="ngStyleApp">
   <ul ng-controller="testCtrl">
       <li ng-repeat="value in list" ng-style="getStyles($index)">{{value}}</li>
    </ul>
</div>

JavaScript

angular.module('ngStyleApp', [])

.controller('testCtrl', function($scope) {
   $scope.list = [1,2,3];
   $scope.getStyles = function(index) {
       console.log('getting styles for index ' + index);
       return {
           color: 'red'
       };
   };
});