These are chat archives for angular/angular-2-ionic-2

26th
Jun 2017
loiggeb
@bloigge
Jun 26 2017 14:39
hi - is there a way to have ion-items (with ion-label and ion-input) inside an ion-grid. if the user uses a tablet I would like to have 2 or 3 fields in a row. on a mobile-phone it should be like a list
UncertaintyP
@UncertaintyP
Jun 26 2017 14:50
@bloigge You can put an ion-item inside an ion-col
loiggeb
@bloigge
Jun 26 2017 15:09
@UncertaintyP yeah I found the problem - I was having a form and I placed the grid outside the form - but the grid needs to be inside. then it works like expected
UncertaintyP
@UncertaintyP
Jun 26 2017 15:23
good to know :)
Zurie
@zurie
Jun 26 2017 19:16
does anyone know the proper "syntax" for HTML classes to show inline form error messages, I can't find anything in the docs and didnt know if there was a internal component that handles iOS and android styles, sorta like the label / input
i have found myself doing this
      <ion-item *ngIf="!sent">
        <ion-label floating>FirstName</ion-label>
        <ion-input id="FirstName"
                   type="text"
                   [value]="FirstName"
                   formControlName="FirstName">
        </ion-input>
      </ion-item>
      <ion-item *ngIf="!sent && fabForm.get('FirstName').hasError('required') && fabForm.get('FirstName').touched">
        <p class="form-error">
          <small class="up">This field is required</small>
        </p>
      </ion-item>
but its not what i want
like material design has md-input and md-error