title: restrict all characters except integer in angular 2
body: <p>I want to restrict all characters entry except integer in to text box which I am using in angular 2 application , When user start typing other characters it should not show up in textbox ?</p>
  
  <p>I tried out keyUp event , but doesn't seems to be working ?</p>
  
  <pre><code>&lt;input type="text" id="txtEmpID" [(ngModel)]="filters.empID" class="form-control"
  (keyup)="onKey($event)"&gt;
  
  
    onKey(event: any) {
          var charCode = event.keyCode;
           if (charCode &gt; 95 &amp;&amp; charCode &lt; 106 ) { {
              console.log(charCode);
              return false;
          }
  }
  </code></pre>
  
  <p>I cant use  <code>&lt;input type="number" &gt;</code> as application uses IE9 and older browser which doesn't support these new HTML 5 standards . <em>I know IE sucks</em> </p>