How to use BackButton event ? Best pratice?

Try this :
(add id attribute to each ion-view)

angular.module(‘starter.controllers’, [])
.controller(‘AppCtrl’, function($scope,$ionicPlatform) {
$ionicPlatform.registerBackButtonAction(function () {
if (document.getElementById(“home”)) {
ionic.Platform.exitApp();
}
else if(document.getElementById(“fixtures”)||document.getElementById(“points”)||document.getElementById(“teams”)||document.getElementById(“winners”))
{
window.location="#/app/home";
}
else if (document.getElementById(“black”)||document.getElementById(“blue”)||document.getElementById(“orange”)||document.getElementById(“red”)||document.getElementById(“green”)||document.getElementById(“white”))
{
window.location="#/app/teams";
}
}, 100);

})