The scope's $digest() method shouldn't be used. You should prefer the $apply method.