Use $timeout instead of setImmediate.
Merge pull request #1 from lemonde/use-timeout

Use $timeout instead of setImmediate