angular怎么样注销事件

 

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

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

相关文章: