When should reread of cl_crm_bol_entity and $scope.$apply be called manually

CL_CRM_BOL_ENTITY~REREAD

CHECK line 35, scan lv_do_reread to know the logic of its assignment.

reread will not be triggered until this flag is set as true.

$scope.$apply in Angular

When we should call $scope.$apply manually?
看一个实际例子:第14行的div绑定到了angular的模型字段message。
该应用启动后,屏幕显示第6行绑定的值:Waiting 2000ms for update。
然后启动第7行的setTimeout定时器,2秒后,执行定时器的回调函数, 在第8行将模型字段的值改成"Timeout called".

然而,在浏览器上我们没有观察到期望中的页面刷新,UI仍然显示Waiting 2000ms for update,而不是我们期望的Timeout called。
Solution:


要获取更多Jerry的原创文章,请关注公众号"汪子熙":

原文地址:https://www.cnblogs.com/sap-jerry/p/12403501.html