ERROR <ion-select> IONIC


Runtime Error
Error in ./ConfigPage class ConfigPage - caused by: Cannot create property ‘buttons’ on string ‘action-sheet’

	<ion-select interface="popover" selectOptions="action-sheet">
		<ion-option>Black Olives</ion-option>
		<ion-option>Extra Cheese</ion-option>


Anyone can help me please ?


Not having [ ] around the selectOptions attribute means it’s parsing it like a string, but it should really be interpolating your input, so you need [ ]

<ion-select interface="popover" [selectOptions]="options">

and in your component, options should be a member variable:

this.options = {
  title: 'Pizza Toppings',
  subTitle: 'Select your toppings',
  mode: 'md'

See under the heading Select Options for more info:


thanks but here, i have 2 buttons. I need auto select… popover is not autoselect ?

	<ion-select interface="popover" [selectOptions]="selectOptions">


ionOption docs:

Set the attribute selected="true" on one of your <ion-option> elements like this:
<ion-option selected="true"></ion-option>


No, i need remove the button ok and cancel…


It should be popping up like a popover with no buttons… try:

<ion-select [interface]="'popover'" [selectOptions]="selectOptions">


nothing…i try this…


anyone ? i need help


I have the same problem:

	<ion-select  interface="popover" [(ngModel)]="selectedPeriodId" (ionChange)="onPeriodChange()">
		<ion-option *ngFor="let period of periods" [value]="">{{}}</ion-option>


maybe try value="" instead of [value]=""
is working in my code


also, maybe try giving your ion-select name="selectedPeriodId". For no reason other than that’s how mine is set up and it’s working. Don’t know if it makes a difference programatically.
I also have my ion-select and ion-option wrapped in one ion-item. Maybe that’ll help

  <ion-select name="venue" interface="action-sheet" [(nmModel)]="venue" (ngModelChange)="modChange($event)">
      <ion-option *ngFor="let venue of venues">


Thanks for your suggestions jaydz, it still isn’t working…


upgrading to V3 solved it for me: