title: Ionic 2 - Prevent exit app on hardware back button
body: <p>In my Ionic 2 App the hardware back button (android, windows) should work like he is doing it on default, with one exception: He should not exit the app if there is nothing to go back.</p>
  
  <p>I know I can do it like this:</p>
  
  <pre><code>platform.ready().then(() =&gt; {
      platform.registerBackButtonAction(() =&gt; {
          // Default action with the exception here
      },);
  });
  </code></pre>
  
  <p>But how must I do it exactly now, to make it work as default but with this one exception? In the <a href="http://ionicframework.com/docs/v1/api/service/$ionicPlatform/#registerBackButtonAction" rel="nofollow noreferrer">ionic 1 docs of that function</a> there are the priorities of the different cases. But I think that got changed in ionic 2!? Because in the <a href="https://ionicframework.com/docs/api/platform/Platform/#registerBackButtonAction" rel="nofollow noreferrer">ionic 2 docs</a> there are not these priorities. I have tried to set the priority to 99, because then everything should work as default. But now the sidemenu can not be closed anymore and thats why I think the priorities of ionic 1 have been changed, because in the ionic 1 docs the priority of the sidemenu is 150 and thats why my function should be ignored. Someone can help me with it?</p>