$scope.$on('$destroy',function() { $timeout.cancel(timeout); });
或者对于Angular 1.5中的新组件语法:
this.$onDestroy = function() { if (timeout) { $timeout.cancel(timeout); } }