2 ion-input on the same line IONIC 2

0

I have a problem with my project with IONIC 2, I need to insert 2 text fields on the same line. I have tried to do this using, when I put only text inside it works, but when I put it it is not displayed.

Below is the html section that I'm having problems with:

    <ion-item>
      <ion-grid>
        <ion-row>
          <ion-col width-50>
            <ion-item>
              <ion-label>Minímo</ion-label>
              <ion-input type="number" [(ngModel)]="valorMinimo"></ion-input>
            </ion-item>
          </ion-col>
          <ion-col width-50>
            <ion-item>
              <ion-label>Máximo</ion-label>
              <ion-input type="number" [(ngModel)]="valorMaximo"></ion-input>
            </ion-item>
          </ion-col>
        </ion-row>
      </ion-grid>
    </ion-item>
    
asked by anonymous 24.06.2017 / 13:05

1 answer

0

I was able to solve it, the problem was the tag ion-item out of the ion-grid tag. I just removed and it worked:

<ion-grid>
    <ion-row>
      <ion-col width-50>
        <ion-item>
          <ion-label>Minímo</ion-label>
          <ion-input type="number" [(ngModel)]="valorMinimo"></ion-input>
        </ion-item>
      </ion-col>
      <ion-col width-50>
        <ion-item>
          <ion-label>Máximo</ion-label>
          <ion-input type="number" [(ngModel)]="valorMaximo"></ion-input>
        </ion-item>
      </ion-col>
    </ion-row>
  </ion-grid>
    
28.06.2017 / 03:55