Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49101

Exit app and dont save history

$
0
0

@PterPmnta wrote:

I wonder how I keep my application save the record and that when in a view prederteminada by giving click the Back button exit the app android

App.js

`angular.module('unicesarApp', ['ionic', 'ngCordova'])

.run(function($ionicPlatform) {

$ionicPlatform.ready(function ($state) {

if (window.cordova && window.cordova.plugins.Keyboard) {

       cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
       cordova.plugins.Keyboard.disableScroll(true);

}

$ionicPlatform.registerBackButtonAction(function (event) {

        if ($state.current.name == 'menuestu' || $state.current.name == 'menuprof') {
            navigator.app.exitApp();
        } else {
            navigator.app.backHistory();
        }

}, 100);

});

});`

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 49101

Trending Articles