$scope.$on('$destory',function(){});
当离开当前页面时,将当前页面的全局监听事件进行消除摧毁。
如对rootScope,window的全局监听。
$window.addEventListener('xx', Fn, false),$rootScope.$watch('xx',()=>{});