You can use this pipe like:
<pre [innerHtml]="YOUR_JSON | prettyJson: [true, 3]"></pre>
prettyJsonPipe default values are 'false' for line numbers and 3 for paddings.
The difference between <pre>{{YOUR_JSON | json}}</pre>
and this pipe; You can add line numbers and you have a CSS file colored by value types like string, number and bool.