I have a page in AngularJS which has a form containing some fields. Upon loading that page, I want a bookmark which when clicked to fill the fields based on data in a configurat
Call $apply after the data has been entered.
$scope.$apply()
This is used to hook into angular's digest cycle when events occur outside of angular.
From the Docs
$apply() is used to execute an expression in AngularJS from outside of the AngularJS framework. (For example from browser DOM events, setTimeout, XHR or third party libraries). Because we are calling into the AngularJS framework we need to perform proper scope life cycle of exception handling, executing watches.