$ionicView.afterLeave not triggered

I navigated from view 1–> view2–> view3, on view3, I called my back-end API to do something and in the success call back, I ran $ionicHistory.goBack(-2) to go back to view1. On view3, I use:
$scope.$on("$ionicView.afterLeave", function () {
console.log(“afterleave called”);
// Free up memory used for caching object.
if ($ionicHistory.currentStateName() === “app.xxxx”) {
console.log(“view after leave”);
However, the afterLeave event never gets triggered. why?