I am so confused using the method $scope.$digest(). As far as I know, when we call $scope.$digest(), it will not update the value of the parent scope, therefore
his processes are all observers of the current volume and his children
but when I call $scope.$digest(), it also updates the parent scope, in this case $rootScope.
In the following example, I have a demo. As $rootScopeI have a variable called value_on_root, so every time I call the event onchangeat the entrance, I call the angular function and within the changing value of the variable file_src, which is on $scope, and I change the value for the variable value_on_root, which is on $rootScope, so when I I call $scope.$digest, his update call calls observers on $rootScope.
See an example here
Click to see an example in CODEPEN
source
share