title: Angular 8 Input validation accept only numbers
body: <p>I'm creating dynamic input field it will accept all type values. I need to restrict only numbers to be enter.</p>
  
  <p>template:</p>
  
  <pre><code>&lt;tr  *ngFor="let item of rowData"&gt;
      &lt;ng-container *ngFor="let hitem of columnDefs" &gt;
        &lt;td *ngIf="!hitem.dropdown; else selectDrop"&gt;
          &lt;span *ngIf="hitem.edit;else content"&gt;
            &lt;div *ngIf="editing"&gt;
            &lt;input [required]="required"  [name]="item[hitem.field]" [(ngModel)]="item[hitem.field]" /&gt;
            &lt;/div&gt;
            &lt;div *ngIf="!editing"&gt;
              {{item[hitem.field]}}
            &lt;/div&gt;
          &lt;/span&gt;
        &lt;ng-template #content&gt;content here... {{item[hitem.field]}} &lt;/ng-template&gt;
        &lt;/td&gt;
        &lt;ng-template #selectDrop&gt;
          &lt;td&gt;
            &lt;select [(ngModel)]="item[hitem.field]"&gt;
              &lt;option *ngFor="let item of aplAry"&gt;{{item}}&lt;/option&gt;
            &lt;/select&gt;
          &lt;/td&gt;
        &lt;/ng-template&gt;
        &lt;/ng-container&gt;
    &lt;/tr&gt;
  </code></pre>
  
  <p>data:</p>
  
  <pre><code>mainHead = [{name:'', colspan:1}, {name:'Deatils', colspan:2}]
  columnDefs = [
          {headerName: 'Make', field: 'make', edit:true },
          {headerName: 'Model', field: 'model', dropdown: true },
          {headerName: 'Price', field: 'price', edit:true}
  ];
  aplAry = ['Celica','Mondeo','Boxter'];
      rowData = [
          { make: 'Toyota', model: 'Celica', price: 35000 },
          { make: 'Ford', model: 'Mondeo', price: 32000 },
          { make: 'Porsche', model: 'Boxter', price: 72000 }
  ];
  </code></pre>
  
  <p><a href="https://stackblitz.com/edit/angular-4tdg9p?file=src%2Fapp%2Fapp.component.ts" rel="nofollow noreferrer">Stackblitz example</a></p>