I have an Angular2 component to display the list of speakers in some data. When I put the following code in my xyz.component.html, it displays the list as comma separated strings. How can I display each one in a different line -- essentially put a line break after every one.
<div *ngIf="data.speakers">
<span class="attr-key">Speakers:</span><br>
<span class="attr-value">{{data.speakers}}</span>
</div>
data is what comes due to binding. It has an element called speakers that is defined as string[].
ngForinstead ofngIf