A good option to do syntax highlighting on code is the highlight.js library, especially because it can automatically detect the programming language used, so you don't need to specify the language on each code block.
The simplest way to use the library is to call the initHighlightingOnLoad() method, which does syntax highlighting on all the code on the page -- that is, code inside
Unfortunately, that doesn't work on Angular, as it expects all the code to already be from the start in the HTML of the page.
A work-around for Angular is to call the highlightBlock(block) method on each code block, like described in this Stack Overflow post.
That works OK for code blocks that are in the static HTML in the template.
You might need it though for HTML content dynamically added to the page, like HTML content retrieved from the database and rendered inside the template. That was also my scenario, so I needed a solution.