Best way to pass a message between routes

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!

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

This looks to me like a “flash” message, maybe check this awesome addon: GitHub - adopted-ember-addons/ember-cli-flash: Simple, highly configurable flash messages for ember-cli

1 Like