$location.url() doesn't re-call / reload the controller

I’m navigating between 2 controller with $location.url(’/controller?param=value’), then I’m checking on the value of param to change $scope values… But the strange thing that the $location.url() is not reloading the controller! It displays but without reloading it…

Here is the scenario

  1. User visit barcode page => redirect to product page => get back to barcode page(now the controller doesn’t reload)!

To reload the controller, try using $route.reload!

Then your view is cached by default… instead of reloading the whole controller use the ionView events. to trigger parts of your code, which should execute everytime you enter the view


and then the View LifeCycle and Events

1 Like