How to prevent code repetition in html file


#1
<ion-item text-wrap>
  		This text changes  
</ion-item>

i have to write the above code 50 times to show different text.
can anyone please suggest me how to reduce the size of the html file.
please provide the code, really need it.
Thanks in advance :slight_smile:


#2
<ion-item text-wrap *ngFor="#item of items">
  {{item}}
</ion-item>

#3

thanks for the reply sir …can you provide the .js code also.


#4

I don’t know that you use. For TS:

public items: Array<string> = ['foo', 'bar'];

I recommend you to read the Angular 2 documentation.