@bastienroussel wrote:
Hello.
In my JSON, I have many return to line ("\n"). I want to display it on my phone screen… but that doesn’t work.My JSON
[ { "titre": "Into the wild", "categorie": "tuto", "contenu": "Et si on tentait l’Alaska\tPour devenir homme\n Au milieu des loups \nSentir l’eau du ruisseau \nEntre les doigts \nSi on quittait tout demain \nL’aliénation à deux c’est inutile\nSi nous partions main dans la main.", "reponse1": "In to the wild \rIn to the wild ", "reponse2": "Si nous faisions comme lui \nCelui qui a tout quitté Pour les ours blancs \nPour regarder l’immaculée conception\n Redevenir pour un moment \nCelui qu’on a été un jour \nLe jour où nous n’étions qu'élan\n Qui apprend à marcher " }]
My HTML :
<ion-list> <ng-container *ngFor="let item of itemsJSON" > <button ion-item *ngIf="item.categorie=='question'" (click)="itemSelected(item)"> {{ item.titre }} </button> </ng-container> </ion-list>
On my phone screen, there are no carriage return or no return to line. So have you got the solution please ?
Posts: 1
Participants: 1