JSFiddle - React, Tailwind, and code Playground

by Marcio Souza

HTML

<div ng-controller="MeuController" ng-app> 
    <div>Divisão simples: 100 / 10 = {{100 / 10}}</div> 
    <br />
    <table>
        <tr>
            <th>Tabela de Clientes</th>
        </tr>
        <tr ng-repeat="cliente in clientes">
            <td ng-class='{impar: $index % 2 == 0, par: $index % 2 != 0}'>                     
                {{cliente.nome}}
            </td>
        </tr>
    </table>
</div>

CSS

.par {
    background-color: gray;
}
.impar {
    background-color: lightGray;
}

JavaScript

function MeuController( $scope ) {
    $scope.clientes = [
        { nome: 'Cliente 1' },
        { nome: 'Cliente 2' },
        { nome: 'Cliente 3' },
        { nome: 'Cliente 4' },
        { nome: 'Cliente 5' }
    ];   
}