I have the following configuration for the ui router state in my angularjs application.
$locationProvider.html5Mode(true); $stateProvider .state('index', { url: '/index?zoom¢er', views: { 'map': { controller: 'MapCtrl', templateUrl: 'map.html' } }, reloadOnSearch:false });
However, the rewind button in the browser goes to a different url, but I need to reload the page with urls like stateParams.
For example: User1 go to http://www.example.com/index?zoom=2¢er=1,2 . then it performs a grouping operation on the page, the url becomes http://www.example.com/index?zoom=12¢er=3,4
Then he presses the back button, the url changes to the previous one, but I need to reload my page so that the controller can read the request parameters to do the right thing ...
Any way to let it work with the browser back / forward?
source share