Используйте <br />
.
Чтобы вставить HTML в тег с Angular, используйте: <span class="card-title" style="font-size: 12px" [innerHTML]="item.itemName"></span>
Вы можете добавить следующий CSS
.mat-tooltip {
white-space: pre-line;
}
.with-pre-line
{
white-space: pre-line;
}
<div>
without white-space: pre-line;
some text with spaces
and
newlines
<div>
<div class="with-pre-line">
with white-space: pre-line;
some text with spaces
and
newlines only breaks
on newlines
<div>