Angularjs Examples

AJS Examples


AngularJS $scope.$apply() Function

The AngularJS $apply function is used to execute an expression in AngularJS from outside of the angular framework. When the $apply() function call finishes AngularJS calls $digest() internally, so all data bindings are updated. That make sure that all watches are checked, and thus all data bindings refreshed. The $apply function takes a function as parameter to execute.

Syntax

AngularJS $scope.$apply() Function Example