scope.$apply is to be used when updating scope variables. I think you do too much in scope.$apply here.