angular/angular.js — pull request #3294 by bwiklund (2013-07-22 04:46:46+00:00)
Title: feat(): added scope as an optional argument to $timeout()

This isn't a complete request yet, but I'm curious to see if there's any interest.

It would be nice if $timeout could be passed a scope to run $apply() on, rather than always using $rootScope. I think this would help performance in larger apps(?). Of course, this is doable by hand in your own code, but this makes it more convenient / less verbose.

I think it could also be the 3rd argument, rather than the 4th. `true` could mean use $rootScope, `false` would mean don't call $apply, and and passing a scope would call $apply on that scope.

Thoughts?