<!DOCTYPE html>
<html>
<head>
<script src="http://code.angularjs.org/1.2.0-rc.2/angular.js"></script>
<script>
var cartApp = angular.module('sCartApp', []);
cartApp.controller('sCartCtrl', function($scope) {
$scope.ngShowhide = false;
$scope.ngShowhideFun = function(flag) {
if (flag) {
$scope.ngShowhide = false;
} else {
$scope.ngShowhide = true;
}
};
});
</script>
</head>
<body ng-app="sCartApp">
<div ng-controller="sCartCtrl">
<a ng-click="ngShowhideFun(ngShowhide)">angularjs toggle show hide button</a>
<div ng-show="ngShowhide">
<div style=" background-color : yellow">
Hi This is body area!
</div>
</div>
</div>
</body>
</html>