Keep dropdown values when go back and forth in my views - using localStorage
168 views
Skip to first unread message
Syrrah
unread,
Apr 12, 2021, 12:56:22 AM4/12/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Angular and AngularJS discussion
I have this project, with VB for backend and AngularJS for the frontend. 1 of the issues i am tasked to fix is a dropdown that doesn't keep it's values after i change page and then go back to said page.
In more detail:
i have a list coming from the backend - VB, with all the data i need, which said list i use for the dropdown
i have a view that has a 4 dropdowns to apply filters to the page .
i apply a filter or a combination of filters to see only the desired applications.
i click on an application and therefore i am redirected to the page of said application.
i do all i have to do there and so i click the browser back button to go to the list of all the applications.
the filters are lost and i need to still have them active.
List item
what i have done so far:
i bind the value of each dropdown (each filter to be exact) in localStorage
the localStorage values change along with the dropdowns
What i need is to have the values of localStorage apply to said dropdown, so that each filter can still be applied when i go back to this page.