Correctly exit APP



I’m trying to set ng-click="ionic.Platform.exitApp()" to a button but it dosen’t work, i also tried ng-click="exitApp()" and ng-click="$ionic.Platform.exitApp()"but it dosen’t work either.

I’m using Ionic Creator, according to this docs it should be quite simple, but i don’t know how to correctly set this adjust. I also tryied to add a module into Ionic Creator as:

angular.module('app.exit', []).exit(function($scope) {

    // will execute when device is ready, or immediately if the device is already ready.

  var deviceInformation = ionic.Platform.device();

  var isWebView = ionic.Platform.isWebView();
  var isIPad = ionic.Platform.isIPad();
  var isIOS = ionic.Platform.isIOS();
  var isAndroid = ionic.Platform.isAndroid();
  var isWindowsPhone = ionic.Platform.isWindowsPhone();

  var currentPlatform = ionic.Platform.platform();
  var currentPlatformVersion = ionic.Platform.version();

  ionic.Platform.exitApp(); // stops the app

Adding this module console log prints: “exit is not a function”



I have a paid ionic creator account, the support team redirects me to this dead forum.
I’m very disappointed with the ionic team, it is true that u save a lot of time using the creator but there is a huge lack of documentation about the usage, the framework has another structure and all the examples are related with the framework, there is a very small communitty using the creator so there is no support about the usage of the creator.