Never allow "back" function

I want to permenantly disable the “back” option from within my application.

I’ve tried the following:

$rootScope.$on('$stateChangeSuccess', function() { 
  $ionicHistory.clearHistory();
});

but no luck.