angular怎么样注销事件

angular怎么样注销事件

$scope.$on("$destroy", function() {
//清除配置,不然scroll会重复请求
})

在Controller中监听$destory事件,这个事件会在页面发生跳转的时候触发。

原文地址:https://www.cnblogs.com/aliwa/p/6552525.html