I have 2 database tables, letters and letterTemplates with an Angularjs frontend.
In letterTemplates.content column, I have a html template with an embedded angular expression like so:
<p> Dear {{letter.user.name}},</p>
And in the letters preview, I display the letterTemplate.content like so:
<div ng-bind-html="letterTemplate.content"></div>
which returns the following output:
Dear {{letter.user.name}},
How do I get the Angular expression to execute?
The solutions outlined in How to make ng-bind-html compile angularjs code relied on using hardcoded Angular templates, whereas I need to parse html and angular statements from an API response.