My Controller is not calling each time

.controller(‘EventCtrl’, function($scope, $rootScope, $location) {




suppose there is a page named index.html#/event
when it is called first time “TEST” is displayed in console
but when it is called second time it is not working.

Thank you.

View-Caching caches the scope and template the first time you navigate to the view.
If you reenter the view -> the cached one is used.

to re-call your function to not cache that view or listen to ion-view events:

like $ionicView.enter to run your code everytime you enter the view :wink:


Thanks Man…
and what should i use instead of $window.history.back(); because it’s not working currently.
i’ve done some project with old versions of ionicframework in which thoes $window… kind of functions were working. but in latest version of ionicframework it’s not working.$ionicHistory/



1 Like