Within my Typescript file, I currently have the following code:
this.comments = this.comment1 + '\n' + this.comment2 + '\n' + this.comment3;
I have also included a conditional statement that checks if comment1, comment2, or comment3 is empty and assigns it ' '.
When binding in HTML, I use the following:
{{comments}}
The current output appears as follows (assuming comment2 is an empty string):
comment1 value
comment3 value
This results in extra vertical spaces for comment2. How can I eliminate this vertical space when comment2 is empty?
Appreciate your assistance.