Hi i am new for Ionic and in my listview each row having checkbox and my application user have a option to select multiple items using checkbox,How ca i implment this functionality can some one help me please.
.html:
<ion-content padding>
<ion-list>
<ion-item *ngFor="let contact of contacts">
<ion-label> </ion-label>
<ion-checkbox (ionChange)="updateCheckbox()"></ion-checkbox>
</ion-item>
</ion-list>
</ion-content>
.ts:-
export class CheckboxListPage {
contacts:any
constructor(public navCtrl: NavController, public navParams: NavParams) {
this.contacts = [{"id":1,"name":"ram1"},
{"id":1,"name":"ram2"},
{"id":1,"name":"ram3"},
{"id":1,"name":"ram4"];
}
}
Aucun commentaire:
Enregistrer un commentaire