title: How to allow only one decimal point for input of type number in ionic 1
body: <p>I am using a input of type number in which it allows multiple decimal points so i have tried using the regex not to allow more than one decimal point but even after using the regex i am facing the same issue can anyone tell me how to allow only one decimal point in input of type number in ionic1</p>
  
  <p>Html:</p>
  
  <pre><code>&lt;input stopccp focus-me class="inputContainer trade_input" type="number" name="" ng-model="vm.total_amount[$index]" ng-change="vm.onTotalCost()" limit-char limit="5" ng-keyup="vm.decimalcheck(vm.total_amount[$index])"  &gt;
  </code></pre>
  
  <p>Regex in function:</p>
  
  <pre><code>function decimalcheck (element) {
    $log.log('decimalcheck got called', element);
    var regex = /\d*\.?\d?/g;
    return regex.exec(element);
  }
  </code></pre>