Simple Method to Display Code Snippets in Html — Angular
Published in
2 min readSep 22, 2021
There are a few packages that help to display code snippets in Html for Angular projects. If you don’t like using them, here is a simple method that you can use.
Demo: https://stackblitz.com/edit/display-code-in-html-angular
Using pre & code tag
The
<pre>
tag defines preformatted text.