In this article, you will learn 3 ways of adding break line to string interpolation in Angular 2+.
You can simply add styling property white-space: pre-wrap to the div surrounding your string, where it breaks the line at new line character in the string and renders the white spaces as it is.
Note : break line character ,breaks line in HTML text document and it does not work in string variable declared in typescript file, unless you use step 2 or 3 below.
You can use “inner Html” property binding to interpolate an HTML snippet into an…
I'm a work in progress FullStack Developer