I am currently in the process of creating a directive that is designed to accept a "message" input which may contain HTML and nested Angular directives. In my directive's controller, I am using the following code:
var compiled = $compile(message)($scope);
this.message = $sce.trustAsHtml(compiled.html());
However, I have encountered an issue where the message will not compile if it does not have a valid start and end tag. I am curious if there is an alternative approach or if Angular offers any solutions to address this without resorting to regex.