I know I am revisiting an old problem but I hope there are new answers. I am using angular/Modal to display a paragraph from a .json file. I need to insert a newline for each paragraph when displayed in the browser. I have tried \n ,\r,
This is a sample of an entry:
"termsAndServiceContent": "1. TERMS OF USE: \n These Terms of Use (Terms) govern your access or use, from within the United States and its territories and possessions ...........\r <br/> By accessing or using the Services, you confirm your agreement to be bound by these Terms........",
I expected to get a new line for the \n and \r but nothing happens. How can I get the browser to recognize the escape characters?
I guess the question is quite similar and I did mentioned that its an old issue. I really didn't see this
https://stackoverflow.com/questions/39325414/line-break-in-html-with-n
question before but I still don't believe the answers address my issue. I am not using plain HTML I am using Angular and my render code looks like this:
<a (click)="showTermAndServicesWindow($event)">{{LOCALIZATION.tos}}</a>
where .tos is my .json file and that's all the HTML I want in the view....also I don't want to do any HTML templating in the .ts modules.
` – Mark Jan 10 '18 at 02:49
). The escaped control characters (\r \n) are for not for browsers – marekful Jan 10 '18 at 02:50
. My problem is I just want to insert
in the .json text. something like this ....text from .json file
this doesn't work When I do this the browser doesn't recognize it. – MichaelE Jan 10 '18 at 11:10