I don't understand how to use $scope.$watch
and $scope.$apply
. 我不明白如何使用$scope.$watch
和$scope.$apply
。 The official documentation isn't helpful. 官方文檔沒有幫助。 css
What I don't understand specifically: 我不明白的是: angularjs
I tried this tutorial , but it takes the understanding of $watch
and $apply
for granted. 我嘗試了本教程 ,但須要理解$watch
和$apply
是理所固然的。 app
What do $apply
and $watch
do, and how do I use them appropriately? $apply
和$watch
什麼做用,如何正確使用它們? this