Monday, 12 December 2016

Run a controller function whenever a view is opened/shown

.controller('MyCtrl', function($scope) {
  $scope.$on('$ionicView.enter', function() {
     // Code you want executed every time view is opened
     console.log('Opened!')
  })
})

No comments:

Post a Comment