Append text to binded item dynamically

Hi guys

I am trying to append text to a binded item but am not sure if it can be done like this

                        <ion-row no-padding  *ngFor="let item of movieData">
                            <ion-col>{{item.running_time}} min  and  {{item.age_restriction}}</ion-col>
                        </ion-row>

So basically I want to append the “and” to {{item.age_restriction}}. The reason is that if there is no {{item.age_restriction}} data then it should not show the word “and”.

I have also tried the below but I get errors

                        <ion-row no-padding  *ngFor="let item of movieData">
                            <ion-col>{{item.running_time}} min  <span [innerHTML]='"and"&&"item.age_restriction"'></span></ion-col>
                        </ion-row>

try


<ion-col>{{item.running_time}} min  <span *ngIf=" item.age_restriction != '' ">{{item.age_restriction}}</span>
1 Like

@Jacktoolsnet This works, thanks a lot