Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49229

Append text to binded item dynamically

$
0
0

@dhameer wrote:

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>

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 49229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>