@ccesarc wrote:
Guys, I'm new to IONIC and I have a problem.
I do not know how to get the information from this code. Exemple in [(ngModel)]="todo"
I tried in many ways, but I could not do it.
Thank you all for your help.
And sorry for my English.
<form (ngSubmit)="logForm()"> <button ion-button type="submit" block>Adicionar Destinatários</button> <ion-list> <ion-item *ngFor="let item of itens"> <ion-label>{{item.title}}</ion-label> <ion-select multiple="true" okText="OK" cancelText="Cancelar" > <ion-option *ngFor="let itemsub of item.subcategoria">{{itemsub.titulo}}</ion-option> </ion-select> </ion-item> </ion-list> </form>itens:any; todo = [] this.itens = [ { id: '1', title: 'Categoria 1', subcategoria : [ { id: '1', titulo:'Subcategoria 1' }, { id: '2', titulo:'Subcategoria 2' }, { id: '3', titulo:'Subcategoria 3' } ] }, { id: '2', title: 'Categoria 2', subcategoria : [ { id: '4', titulo:'Subcategoria 4' }, { id: '5', titulo:'Subcategoria 5' }, { id: '6', titulo:'Subcategoria 6' } ] }, { id: '3', title: "Categoria 3" } ];
Posts: 1
Participants: 1