Description
I don't think using a class like GreetingUtil would be considered best practice.
Motivation
Seems outdated to do it like this. Also, there could be extra issues with unit testing, localization, and dependency injection.
Suggested Implementation
(If project is further upgraded) Angular 20 template literals may provide a way to add the same functionality.
Alternate Implementations
You could likely use a service, pipe, or directive to do the same thing.
Description
I don't think using a class like
GreetingUtilwould be considered best practice.Motivation
Seems outdated to do it like this. Also, there could be extra issues with unit testing, localization, and dependency injection.
Suggested Implementation
(If project is further upgraded) Angular 20 template literals may provide a way to add the same functionality.
Alternate Implementations
You could likely use a service, pipe, or directive to do the same thing.