title: Cordova backbutton preventDefault is not working
body: <p>I have application which is done using ionicframework and cordova. In my app i have requirement that if user pressed back button then i need to ignore it. But only after user pressed it third time it should close app.</p>
  
  <p>Previously project was done using phonegap and jquery and same code works. I did small workaround when i am throwing an exception then it app was not closed when it should not.</p>
  
  <pre><code> document.addEventListener("backbutton", function (e) {
          if (new Date() - firstDateClick &gt; 1000) {
              firstDateClick = new Date();
              totalClicks = 1;
          } else {
              totalClicks++;
              if (totalClicks &gt;= 3) {
                  var answer = confirm('Are You Sure You Want Exit');
                  if (answer) {
                      var service = angular.injector(['ng', 'starter.services']).get('DanceService');
                      service.logEvent("exit")
                          .then(function () {
                              alert('exit1')
                              if (navigator.app) {
                                  navigator.app.exitApp();
                              }
                              else if (navigator.device) {
                                  navigator.device.exitApp();
                              }
  
                          })
                  } else {
                      totalClicks = 1;
                  }
              }
          }
          throw "ignore"
      });
  </code></pre>
  
  <p>But i dont like idea to throw exception.</p>