2016-08-10 14 views
0
I have Confusion in $digest when we need to used ? But $apply I think we need when angular js into any element have outside scope then we use $apply and update it with value. 

$ digest意思相同但我们如何使用这样,我们用不同的方式。

内部$摘要调用在此代码中。

+0

<钮纳克单击= “注册()”>更新时间 - 纳克单击< /button> $ scope.updateTime =函数(){$ = scope.data.time新日期(); } – VjyV

回答

1

$apply() - 内部调用$digest只是区别在于它的$ digest循环从rootcope开始并访问所有子元素(他们的模型)并调用它们的$摘要。

+0

rootcope何时启动$ digest循环? – VjyV

相关问题