I think this could be implemented by making use of data attributes and using their value inside a pseudo element(`content: attr(data-form-err)`). Something like this:
`[attr-data-form-err]=”formControl | getFormErr”`
Here getFormErr is a pipe. But probably you don’t wanna repeat this for every form control. So better leverage directive to add this data-attribute dynamically through host binding. This may reduce the complexity and amount of code. But still, we have abstraction accomplished.
Finally, many thanks for this amazing article.