I have a list of items. I am trying to split them with a delimiter. It is working with semicolons, but not working with newline characters. How can I fix this, to work with new line? Would like to show line breaks.
This works:
[value]="productList.join('; ')"
Does not work for
[value]="productList.join('\n ')"
[value]="productList.join('\r ')"
[value]="productList.join('\n\r ')"
Currently using Angular 8 with Typescript.
Resource: JavaScript Newline Character
` tags. Consecutive whitespace is ignored; that's just how HTML and browsers work. – Dave Newton Jun 15 '20 at 22:17
` if you are using a textarea as an input and an HTML element as an output. This is not something related to angular is just how the web works. – ncubica Jun 15 '20 at 22:22