My current issue involves the following scenario: I am using the url
http://localhost:8080/#/dashboard
to display features in my dashboard. For instance, when the url changes to http://localhost:8080/#/dashboard/20
, I need to load cities where the country id is 20. Similarly, if the url changes to http://localhost:8080/#/dashboard/20/1
, I have to load districts where the city id is 1. However, the problem arises when transitioning from loading cities to districts. Whenever the url changes to #/dashboard/20/1
, my controller refreshes and reloads all the data. I am seeking a solution where I can change the url without refreshing the controller. I want to be able to load only districts without reloading the entire data each time.
I attempted using window.history.pushState
but it did not work. Is there a way to disable and enable my $routeProvider
to achieve this goal?
Any suggestions or ideas on how to approach this?