$scope.$on('$stateChangeSuccess', $scope.doRefresh); 这个函数不起效果,我计划想进入当前页面自动刷新,但是只有第一次点击进入页面才可以执行这个函数,再次点击就不进入了,求解。
认证高级PHP讲师
I found a solution, I even tried setting <ion-view title="XXX" cache-view="false"> here to no avail
It only works if the cache is set to false in the route:
.state('receipt', { url: '/receipt', cache:'false', templateUrl: 'areas/receipt/receipt.html', controller: "ReceiptCtrl" }) 这样就可以解决了
Inject $rootScope and use $rootScope to monitor
I found a solution, I even tried setting
<ion-view title="XXX" cache-view="false"> here to no avail
It only works if the cache is set to false in the route:
Inject $rootScope and use $rootScope to monitor