Samplecode3 Angular Js

You might also like

You are on page 1of 1

<html>

<head>
<title>Sample code1 angular js</title>
<script
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"
type="text/javascript"></script>
</head>
<body >
<h1>Sample code1 angular js</h1>
<div ng-app="" >
<table>
<tr>
<td><input type="checkbox" ng-model="edbutton"> to disable button</td>
<td><button ng-disabled="edbutton">click me </button> </td>
</tr>
<tr>
<td><input type="checkbox" ng-model="sbutton"> show hide button</td>
<td><button ng-show="sbutton">click me </button> </td>
</tr>
<tr>
<td><input type="checkbox" ng-model="sbutton"> show hide button</td>
<td><button ng-hide="sbutton">click me </button> </td>
</tr>
<tr>
<!--//for generating any event-->
<td><p> total click of button:{{clickcounter}}</p></td>
<td><button ng-click="clickcounter=clickcounter+1 ">click me </button> </td>
</tr>
</table>
</div>
</body>
</html>

You might also like