In my Angular application I want to set simple error/notification messages in my controller. An example of this uses the Material Snackbar for Angular:
this.snackBar.open(
'Order successful',
'OK',
{ duration: 2500 }
);
My problem is now, that I don't like to have 'magic strings' for my messages in my controllers. Is there a best practice of storing this messages?
I thought about using 2.4 TypeScript enums with associated values in a dedicated error-message-model.
Experiences and suggestions are very welcome.