title: How to validate value 1 and 1.00 as same and 1.01 as different in angular
body: <p>How to treat 1 and the number of decimals should be zero eg) 1.000 as same 
  show the alert pop up number should be same.And the maximum number length of the texbox is 7. </p>
  
  <p>eg)1 and 1.00000001 be different</p>
  
  <p>And the number be 1 and 1.01 as different.Here I have numeric value 1 and numeric value  1. any decimal number.</p>
  
  <p>if the number is 1 and 1.00 means show alert value same and 1.01, or 1.001 or any decimals after number it will be considered as different.</p>
  
  <p><strong>Here is my sample code:</strong></p>
  
  <pre><code>       &lt;!doctype html&gt;
          &lt;html ng-app&gt;
            &lt;head&gt;
              &lt;script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js"&gt;&lt;/script&gt;
              &lt;script src="script.js"&gt;&lt;/script&gt;
            &lt;/head&gt;
            &lt;body&gt;
          &lt;div ng-controller="Ctrl"&gt;
           &lt;input type="text" ng-model="contractDetailsScreen.percent"  maxlength="7" numbers-only="numbers-only" /&gt;  
            &lt;button ng-click="actionme()"&gt;click&lt;/button&gt;
          &lt;/div&gt;
            &lt;/body&gt;
          &lt;/html&gt;
  
  
  
  function Ctrl($scope) {
    $scope.actionme = function(){
  
      if($scope.contractDetailsScreen.percent){
  
        alert('value same');
      }
  else{
    alert("value diffrent");
  }
    };
  }
  </code></pre>
  
  <p>Demo:
  <a href="http://plnkr.co/edit/nxRca6HRQGkVO18c3uXa?p=preview" rel="nofollow noreferrer">http://plnkr.co/edit/nxRca6HRQGkVO18c3uXa?p=preview</a></p>