Handling the hardware back buttons

I was trying to implement the code for registerBackButtonAction(function(){})

But I can’t seem to make it work. Pretty much what happens is that say I have the following structure:

index.html
  -- templates
    home.html
    about.html
    page1.html
        page1a.html
        page1b.html

When I navigate say, from home to page1.html to page1a.html, then navigated back to home.html and went to about.html, then press the back button, I get back to home then go all the way back to page1a.html and page1.html. Is there a more straightforward way to ensure that when you are in the home.html, the back button would not navigate back to the other pages which has been loaded previously?

Some of my code snippet (home.js)

angular.module('test.home', [])

.run(function($ionicPlatform, $ionicPopup, $state){
	$ionicPlatform.registerBackButtonAction(function(event){
		event.preventDefault();
	}, 100);
})

.config(function($stateProvider){

$stateProvider

.state('myApplication.home', {
			url: "/home",
			views:{
				'appContent' :{
					templateUrl: "template/home.html",
					controller: "HomeCtrl"
				}
			}
		})
	})

.controller('HomeCtrl', function($scope, $ionicPlatform, $ionicModal){
	// Some codes here...
});

I’m quite new to Ionic so pardon if some of my codes does not make sense (still trying to grasp the routing and everything in between).

Slightly Off-Topic:

Just wondering, if you are using the Chrome Debugger and using the emulator for the application, is the browser back button the same as the back button for the hardware (Android device)? Or would it still be preferable to generate an APK and load it to your device and test?