Best way to pass a message between routes


#1

Hi all,

What do you recommend to pass a message between routes? What I would like to get is:

  • Sign up page where you can register yourself in the application.
  • If the register process is ok, the application will redirect you to the login page, but it should display a message with the signup response.

I mean, if you reach the login page from the signup page redirection, it should display the signup message. If you reach the page directly, it should not display anything.

Thank you in advance!


#2

I would inject a service with the message to do this. See:


#3

This looks to me like a “flash” message, maybe check this awesome addon: https://github.com/poteto/ember-cli-flash