You can add a parameter to your URL so that it works with Android history.
#/main?page=1
Then use , which , to control the state of your application, and then press the android button.
You can set URL parameters using $location.search :
$location.search('page', 4);
$ location.search docs: http://docs.angularjs.org/api/ng.$location#search
And one more thing: you need to add the reloadOnSearch: false parameter to your $routeProvider.when() declaration for your view. By default, the entire view is reloaded when the request parameter is changed using $location.search() . Setting this parameter to false will cause it to not reboot, which is what you need in this case:
$routeProvider.when('/main', { reloadOnSearch: false });
reloadOnSearch docs: http://docs.angularjs.org/api/ng.$routeProvider#when
source share