angular-ui/bootstrap — pull request #1453 by chrisirhc (2013-12-23 22:01:08+00:00)
Title: fix(carousel): cancel goNext on scope destruction

The problem was that goNext be called after removeSlide when the slide's scope is destroyed. Since the destroy event is broadcasted, it fires on the parent before the child. As such what happens is:

1. carousel's destroy event fires -> resetTimer()
2. slide's destroy event fires -> ctrl.removeSlide(slide) -> ctrl.select(...) -> goNext() -> restartTimer()

Hence, the timer gets restarted by the slide's destroy event after the parent carousel's destroy event is fired.

Discovered after #1451