Warm tip: This article is reproduced from serverfault.com, please click

how to add line break in Angular pipe output

发布于 2020-07-20 05:20:11

How can I add a line break by using an Angular pipe

<th>{{(date | date: 'EEE MMM d')}}</th>

The output of this is like Mon Jul 20 - all in the same line. But I want it separate like:

Mon
Jul
20

In same cell but on a different line. Like adding a <br> tag. Please check the image below:

enter image description here

Questioner
Leander Leo Lagardo
Viewed
0
Eliseo 2020-07-20 14:12:00
<th>
  {{(date | date: 'EEE')}}<br/>
  <strong>{{(date | date: 'MMM')}}</strong><br/>
  {{(date | date: 'd')}}
</th>