JavaScript Video Tutorial - Understanding the difference between $watch and $observe in AngularJS

preview_player
Показать описание
In this demonstration, we will demonstrate the difference between $watch functions and $observe function.
Рекомендации по теме
Комментарии
Автор

Please make full video series on Angular including routing, etc. This is the best ever on Youtube. Please make full video series.

sarveshm
Автор

You can do the same thing with expression for $watch: $scope.$watch('message', function() {...}). And in both cases watch function will be generated (check $scope.$$watchers[0].get )! So usually there is no difference between using expressions and direct watch function in term of performance.

dzmitryulasau