Angular 9 - Refetech the same data on clicking back button

31 views
Skip to first unread message

Nischinth Jain

unread,
May 27, 2020, 9:49:15 AM5/27/20
to Angular and AngularJS discussion

I am beginner to Angular, I need help from you, I have stuck in one problem


Scenario: 

I am working on angular9, based on the requirement, I have used dropdown list, whenever selecting options from dropdown, automatically user table will be shown based on the selected option


Problem: 

After clicking the next button or going to the next page for more info, then again I need to go back to see the same selected option(clicking back button or browser back button)


How to see the selected options list..?


What is the method/procedure to gather the selected option..?


I have tried the router method, but it is not working

bastien lemaire

unread,
May 27, 2020, 10:37:47 AM5/27/20
to ang...@googlegroups.com
Hi, could you link to stackblitz with minimum reproduction code, please.
Very difficult to help without some code to look at.
Thanks

Bastien Lemaire


--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angular/2ba25012-6752-4d75-ad3b-b0c7e58003ed%40googlegroups.com.
Message has been deleted

Nitin Gupta

unread,
Jun 11, 2020, 10:30:27 AM6/11/20
to Angular and AngularJS discussion
The event window.onpopstate gets triggered when history.back() is called from javascript but when across two different pages the window.onpopstate doesn't get invoked using the browser back button. On the back button call history.back() and set some form variable based on the selected option.
Reply all
Reply to author
Forward
0 new messages