vendredi 12 avril 2019

Central Class/Model/Enum for the Text to be displayed in my Components

Currently i'm programming in Angular. I have more than 20 Components each with a field for the title and a field for some text for the user.

Now I was wondering if it would be a good idea to "extract" the strings for all the texts and probably also all the strings for the titles and "collect all of them in a central class or enum. That way i could make easy changes and don't have long strings in the components itself.

Since i also try to use and learn design patterns and good coding style i want to know how to best deal with this.

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire