Ng2-translate and ion-segment button


#1

I’m using the ng2 translate tool.
https://www.npmjs.com/package/ng2-translate

It’s going OK, except now I’ve run into an issue with the ion-segment and its ion-segment-button.

It seems the translation is unable to happen to text inside the ion-segment-button.

Is there a way to have ng2-translate work in this scenario?

Mockup code below:

        <ion-segment [(ngModel)]="mainSegements">
            <ion-segment-button value="a">
                <span>{{ 'SOME_KEY.SUMMARY' | translate }}</span>
            </ion-segment-button>
            <ion-segment-button value="b">
                {{ 'SOME_KEY.DETAILS' | translate }}
            </ion-segment-button>
            <ion-segment-button value="c">
                {{ 'SOME_KEY.WHATEVER' | translate }}
            </ion-segment-button>
        </ion-segment>

#2

Problem appears to be resolved by applying translate service in the .ts file.