I need to return messages for user actions, like "Successfully registered" or things like that, and I was wondering what is the best way to do this, to have a file with all messages or make them hard code?
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (2)
Can I get a snippet of your registration function so I have something to work with?
I don't know if this is a good practice but you can use the .subscribe() method:
In your imports:
In your constructor:
Your function e.g. user creates a post/logs in:
Thanks, but I meant the messages themselves, for example, I could put them all in a messages.json and it would be something like this:
But I don't know if making this file is a good practice, or leaving everything hard code is good, but thanks anyway :)