mercredi 18 octobre 2023

how to get the previous routename in ember 2.16 to used in back button

i have a analytic route in ember this can be accessed from two routes (example user page and profile page) the below code is used to redirect to the analytic route

The problem is that i have a back button in the analytic page i want to send the user to the page from where the call is originated (i.e) if the user got to the analytic page from user page the back button should go to user page and if the user got to analytic page from profile page the back button should lead to profile page.

i dont want to mess the current code so i will be glad if the solution is in the form of action which returns the string of previous page. so that i could just call the action in place where i could give the dest page name.




Aucun commentaire:

Enregistrer un commentaire