Running $apply
on any scope always results in a $rootscope.$digest
. The only case where it might make a difference is when you provide an expression as an argument to $apply
. The expression will be evaluated in the current scope (vs. $rootScope), but afterwards $rootscope.$digest
is always called.
The source code is quite clear: rootScope.js
Bottom line:
If you call $apply
with no arguments, it makes no difference.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…