I'm struggling with a problem in my Angular application. I need to ensure that a TypeScript variable is a valid HTML template to compile successfully, like this:
let v = '<div>bla…</div>'
However, if the variable contains incorrect HTML syntax like this:
let v = '<cc></div>'
it will result in a compilation error. Is there any way to enforce this requirement?
Update:
If it's not possible to check at compile time, is there a way to make the Angular Cli Builder fail during build when encountering such errors?