Angular: Empty Fiddle

http://angularjs.org/

HTML

<script src="http://code.angularjs.org/1.1.5/angular.js"></script>
<div ng-controller="MyCtrl">
    <input type="button" value="Click to toggle boolean" ng-click="toggleBoolean()" ng-class=" boolForTernary ? 'blue' : 'red' "></input>
</div>

CSS

.blue {
    color:blue;
}
.red {
    color:red;
}

JavaScript

var myApp = angular.module('myApp', []);

function MyCtrl($scope) {
    $scope.boolForTernary = false;

    $scope.toggleBoolean = function (value) {
        $scope.boolForTernary ="asas";
    };
}