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的原创文章,请关注公众号"汪子熙":
标签:reread,manually,cl,汪子,should,apply,scope,called 来源: https://blog.csdn.net/i042416/article/details/104605432