Edit on
 <div class="container" ng-app="dApp" ng-controller="dctrl">
        <div class="col-sm-8 col-sm-offset-2">
          <div class="page-header"><h1>apply dynamic class Using Evaluated Expression in angularJS</h1></div>
          <div class="form-group">
             <label>
                 <input type="checkbox" ng-model="red">red (apply "danger" class)
             </label><br>
             <label>
                 <input type="checkbox" ng-model="green">
                 green (apply "success" class)
             </label>
         </div>
         <div ng-class="{danger: red, success: green}">Using ng-class conditionally</div>
     </div>
 </div>
 .danger{
           background-color: red;
       }
       .success{
           background-color: green;
       }
 var app = angular.module('dApp', []);
    app.controller('dctrl', function($scope){
      $scope.btnClass = "danger";
  });
Rerun