$scope.$apply: What Is It Good For

Angular has a lot of magic going on. For a lot of us this binding magic is what initially pulled us to Angular. But, of course, it’s not really magic, and you can come across situations where things stop working. In those cases, the solution is almost always the $scope.$apply() function.