创建这样的简单列表很容易:
List { Text("Item 1") Text("Item 2") Text("Item3") }
但是如何添加类似传统NSTable的选择栏?
答案 0 :(得分:4)
<div *ngIf="isPessoaFisica(); else pessoaJuridica">
<ion-item>
<ion-label position="floating">CPF</ion-label>
<ion-input autofocus="true" name="documento" [(ngModel)]="documentoCpf" type="tel"
[brmasker]="{type: 'num', mask:'000.000.000-00', len:14}"
required></ion-input>
</ion-item>
<ion-item>
<ion-label position="floating">Data de nascimento</ion-label>
<ion-datetime text-right displayFormat="DD/MM/YYYY"
cancelText="Cancelar" name="nascimento"
[(ngModel)]="nascimento"
doneText="OK"></ion-datetime>
</ion-item>
<ion-item>
<ion-label position="floating">Nome da mãe</ion-label>
<ion-input autofocus="true" name="nomeMae" type="text"
[(ngModel)]="model.usuarioPortal.pessoa.nomeMae"
required></ion-input>
</ion-item>
<ion-list>
<ion-radio-group name="sexo" [(ngModel)]="model.usuarioPortal.pessoa.sexo">
<ion-list-header>
<ion-label>Sexo</ion-label>
</ion-list-header>
<ion-item no-padding no-margin lines="full">
<ion-item *ngFor="let sexo of getSexoEnumValues()" lines="none">
<ion-label>{{getSexoEnumSpec(sexo).nome}}</ion-label>
<ion-radio slot="start" [value]="sexo" color="info"></ion-radio>
</ion-item>
</ion-item>
</ion-radio-group>
</ion-list>
</div>strong text