
$ionicHistory monitors or maintains the navigation history in the application. We can navigate backwards programmatically using the goBack function.
Following code Navigates to the previous window using $ionicHistory,
$ionicHistory.goBack();
Equivalent code to the above one.
$ionicHistory.goBack(-1);
Where, “-1” indicates the level.
Navigate to two (2) views backward
$ionicHistory.goBack(-2);
Category: