title: Ionic using number keyboard when input type is text
body: <p>I'm building an app in Ionic for which I need to have a mask input where the user can input numbers, but the mask format is 99-99999999-9 (user can input numbers only).  I'm using angular2-text-mask for masking the inputs.</p>
  
  <p>If I have my input as type = number, the app crash when the mask is trying to add a "-" in the input. If I put type = text it works fine! But the keyboard is the regular one, so it's not the best user experience.
  I thought that a good solution could be to have input type = text but find the way to show the number keyboard. Is that possible?</p>
  
  <p>EDIT (adding code):</p>
  
  <p>Component:</p>
  
  <pre><code>import { Component } from '@angular/core';
  import { NavController, NavParams, AlertController } from 'ionic-    angular';
  import {Validators, FormBuilder} from '@angular/forms';
  import { AccountInformation } from '../accountInformation/accountInformation';
  import { TextMaskModule } from 'angular2-text-mask';
  @Component({
    selector: 'page-addAccount',
    templateUrl: 'addAccount.html'
  })
  export class AddAccount {
    account: any;
    item: any;
    public cuitMask = [/[1-9]/, /[1-9]/, '-', /[1-9]/, /[1-9]/, /[1-9]/, /[1-9]/, /[1-9]/, /[1-9]/, /[1-9]/, /[1-9]/, '-' , /[1-9]/]
  
    constructor(public navCtrl: NavController, public navParams: NavParams,     public alertCtrl: AlertController, private formBuilder: FormBuilder) {
      this.account = this.formBuilder.group({
        number: ['', Validators.required],
        cuit: ['', Validators.required]
      });
    }
  }
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>&lt;ion-header&gt;
    &lt;ion-navbar&gt;
      &lt;button ion-button menuToggle&gt;
        &lt;ion-icon name="menu"&gt;&lt;/ion-icon&gt;
      &lt;/button&gt;
    &lt;/ion-navbar&gt;
  &lt;/ion-header&gt;
    &lt;ion-content&gt;
      &lt;ion-card&gt;
        &lt;form [formGroup]="account" (ngSubmit)="submit()" novalidate&gt;
          &lt;ion-list&gt;
            &lt;ion-item&gt;
              &lt;ion-label floating&gt;Numero de Cuenta&lt;/ion-label&gt;
              &lt;ion-input class="input-default" autofocus text-center type="number" formControlName="number"&gt;&lt;/ion-input&gt;
        &lt;/ion-item&gt;
        &lt;ion-item&gt;
          &lt;ion-label floating&gt;CUIT&lt;/ion-label&gt;
          &lt;ion-input class="input-default" [textMask]="{mask : cuitMask}" autofocus text-center type="text" formControlName="cuit"&gt;&lt;/ion-input&gt;
        &lt;/ion-item&gt;
        &lt;ion-item&gt;
          &lt;button type="submit" class="footer-button" [disabled]="!account.valid" ion-button block&gt;AGREGAR&lt;/button&gt;
        &lt;/ion-item&gt;
      &lt;/ion-list&gt;
    &lt;/form&gt;
  &lt;/ion-card&gt;
  </code></pre>
  
  <p></p>