Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app="myApp">
<head>
  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script>
  <meta charset="utf-8">
  <title>AngularJS ngClass ngClassEven ngClassOdd Example</title>
</head>
<body ng-controller="MyController">
  <input type="text" ng-model="header" placeholder="Enter color">
  <table border="1">
    <thead>
      <tr ng-class="header">
        <th>Name</th>
        <th>Subject</th>
        <th>Marks</th>
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="student in studentData" ng-class-odd="'odd-row'" ng-class-even="'even-row'">
        <td>{{student.name}}</td>
        <td>{{student.subject}}</td>
        <td>{{student.marks}}</td>
      </tr>
    </tbody>
  </table>
  
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
saan1984pro
0viewers