@bonlemuel wrote:
Hi Everyone,
I need help!
I want the $ionicPlatform.on be activated on a certain view (HTML). In my case, when the user is filling up a form on my form view.
$ionicPlatform.on('pause', function() { $scope.InsertRecord(2); // call function to insert a record on the Database });
The reason I've used this is, records must be saved when the user accidentally exits the app (temporarily). On it's current state, it works fine (first load of the controller and view).
The problem is, it also run when the user exits the app even though he is not on the form view. So, the function is called every time the user exits the app (Home button for example).
Hope anyone has a solution for this.
Thank you.
Posts: 5
Participants: 2