AngularJS Example:

by dingen2010

HTML

<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<body ng-app="myApp" ng-cloak>
    <div ng-controller="todocontroller">
        <button ng-click="addCount()">Increment</button>count:{{count}}
        <div ng-show="msgvisible()">too many clicks</div>
    </div>
</body>

JavaScript

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

 function todocontroller($scope) {
     $scope.firstname = "";
     $scope.lastname = "";
     $scope.count = 0;

     $scope.addCount = function () {
         $scope.count++;
     }

     $scope.msgvisible = function () {
         if ($scope.count > 5) {
             return true;
         } else {
             return false;
         }
     }
 }