Ionic Interpolation on HTML

Hi, I am trying to put a dynamic value in the selectOptions of ion-select like this

[selectOptions]="{ title: {{ ‘store’ | translate }}}" but this got an interpolation error

Hi , try this one

<ion-item>
  <ion-label>Select</ion-label>
  <ion-select [selectOptions]="{ mode: 'md' }">
    <ion-option value="1">1</ion-option>
    <ion-option value="2">2</ion-option>
    <ion-option value="3">3</ion-option>
    <ion-option value="4">4</ion-option>
  </ion-select>
</ion-item>

for more information https://github.com/ionic-team/ionic/issues/10531#issuecomment-288753985

It would work, but I need to somehow use a pipe like the translate pipe for this one

I am not an interpolation expert! However, I am curious to know what {{‘store’|translate}} looks like when displayed, outside of your select options.

Whenever I have used binding, I have never had to use interpolation.

I am actually using the angular translation module that’s why I need to have that translate pipe but maybe I need find a way to use the translation for cases like that.

Pipes aren’t the only way to translate things. You can inject TranslateService into your controller and do all the work in there instead of the template.