css

by Bretto

HTML

<div ng-app="">
  <input type="button" value="set" ng-click="myVar=true">
  <input type="button" value="clear" ng-click="myVar=false">
  <br>
  <span ng-class="{'my-class':myVar}">Sample Text</span>
</div>

CSS

</style> <!-- Ugly Hack due to jsFiddle issue: http://goo.gl/BUfGZ --> 
<script src="http://docs.angularjs.org/angular-1.0.0rc8.min.js"></script>
<style>
.ng-invalid { border: 1px solid red; }
.my-class {
  color: red;
}