ionic 2 ion-inputs inside list

2019-07-27 08:51发布

I am trying to make a custom item containing 3 inputs in a list in ionic 2, but it's not working. When I put only 1 input, there's no problem. But if I put other tag with "

 <ion-item *ngFor="let pergunta of avaliacao; let i=index">
    <ion-row>
      <ion-input placeholder="Pergunta" [(ngModel)]="pergunta.descricao" clearInput></ion-input>
    </ion-row>
    <ion-row>
      <ion-textarea [(ngModel)]="pergunta.opcoes"></ion-textarea>
    </ion-row>
    <ion-row>
      <ion-label>Obrigatória</ion-label><ion-checkbox [(ngModel)]="pergunta.obrigatoria"></ion-checkbox>
    </ion-row> 
 </ion-item>    

1条回答
欢心
2楼-- · 2019-07-27 08:54

I did it. It seems I can't put several input inside ion-item. Just replaced ion-item for div

查看更多
登录 后发表回答