There are two ways of back to previous state in mobile device using ionic framework, which is via ion-nav-back-button and the device back button itself.
What function should i call should i need to trigger an action before back to previous state when clicking ion-nav-back-button and pressing device back button?
