Try it
Javascript
Jquery
Angular
Learn Angular
Learn Javascript
Learn Bootstrap
Learn jQuery
Ng-Class-Even-Odd
<!DOCTYPE html> <html lang="en-US"> <head> <title>Welcome in the Angular JS</title> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" /> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0-rc.1/angular.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> </head> <body ng-app="sampleApplication"> <div ng-controller="sampleController"> <div ng-repeat="emp in employees"> <span ng-class-even="'text-success'" ng-class-odd="'text-danger'">{{emp}}</span> <br /> </div> </div> <script> var app = angular.module('sampleApplication', []); app.controller('sampleController', function ($scope) { $scope.employees = ["Bowles", "Audette", "Marie", "Rabuka"]; }); </script> </body> </html>
Output
×
Save This try
Title
Description