I want to display a comma separated list of names like test1, test2, test3. I am using something like below:
<div style="display: inline-block;" *ngFor="let object of objectList; let i = index;">
{{object.name}}{{((i+1) === objectList.length) ? '' : ', '}}
</div>
All the trailing whitespaces are removed and result is test1,test2,test3. I was using   but I read at some places that it was not recommended to use.
How should I preserve these whitespaces?
edit: code didn't have that style tag earlier (which is in a separate .css file in the actual code but placing it inline for the sake of the question)
ng-containerinstead ofdiv? The problem might be that for each item of the array, adivelement is created, and therefore the white space is lost.