In this blog, I will demonstrate how to allow only numeric values in input textbox, using AngularJS. This technique is most useful for quantity and countable input text.

HTML Code

I have designed a simple input type “Text” in HTML.using AngularJS.

  1. class=“panel panel-primary”>
  2.       
    class=“panel-heading”>
  3.         

    class=“panel-title”>AngularJS Text Allow Numeric Only

  4.       
  •       
    class=“panel-body”>
  •        “text”
  •             class=“form-control”
  •             ng-model=“TextValues” />
  •       
  •       
    class=“panel-footer”>
  •     {{TextValues}}
  •