angular 监听离开页面执行相关操作


$scope.$on("$destroy", function() {
//...
})

转载于:https://www.cnblogs.com/zzs-zone/p/11599244.html