Ankit kaushik
1 min readMay 19, 2019

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.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Ankit kaushik
Ankit kaushik

Written by Ankit kaushik

Frontend Tech Lead, Angular Expert

No responses yet

Write a response