Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.1/angular.min.js"></script>
<meta name="description" content="Basic AngularJS example of data binding" />
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body ng-app="myApp" ng-controller="mainCtrl">
  
  <span style="color: red">Val input:</span>
  <input type="number" ng-model="val" step="0.01"></input>
  <button ng-click="decrement()">-0.01</button>
  <button ng-click="increment()">+0.01</button>
  
  <hr>
  
  <span style="color: blue">Val2 input:</span>
  <input type="number" ng-model="val2" step="0.01"></input>
  <button ng-click="decrement()">-0.01</button>
  <button ng-click="incrementValue(val2)">+0.01</button>
  
  
  
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
htmlzetapro
0viewers