【发布时间】:2015-08-27 13:48:31
【问题描述】:
如果某些数据发生更改并且我必须先做一些事情,如何停止卸载。我正在尝试这个,但没有效果
$scope.changed = true;
$scope.$on('$destroy', function () {
if ($scope.changed) {
alert('Let me clean up first !');
return ;
}
});
【问题讨论】:
标签: angularjs