So I am trying to implement a checkbox select in ionic 2, but it doesn’t show the input options. What am I doing wrong?
My meeting-room.html
has
<ion-select [selectOptions]="roomOptions" [multiple]="true">
and my meeting-room.ts
has
availableTimeSlots = [
{
type: 'checkbox',
name: 'check1',
value: '8.30 AM - 9.00 AM',
label: '8.30 AM - 9.00 AM'
},
{
type: 'checkbox',
name: 'check1',
value: '9.00 AM - 9.30 AM',
label: '9.00 AM - 9.30 AM'
}
];
constructor(public navCtrl: NavController) {}
ionViewDidLoad() {
console.log('Hello Meetingroom Page');
}
roomOptions = {
title: 'Time Slots',
subTitle: 'Select your time slots',
inputs: this.availableTimeSlots,
buttons: [
{
text: 'Cancel',
role: 'cancel',
handler: data => {
console.log('Cancel clicked');
}
},
{
text: 'Select',
handler: data => {
console.log('Select clicked');
}
}
]
};
The output is like this,