In this video Iftach Bar explains how exactly a deep watch works, the problems that might occur using it, and explains when exactly it should be used.
- Notice what really happens behind the scenes…when you use a deep watch.…Angular actually creates a deep copy of the…object and check if something has changed.…It does a deep equal that goes…over all the fields recursively.…Notice that this feature should be used carefully.…It might be easier for a developer…to use deep watches in certain places.…But it has a high performance cost.…If you decide to use a deep watch in your code,…make sure that the objects you are using are not huge…so it won't be such a high performance cost…to go over them and try to deep equal them.…
Your application is small enough…so it doesn't really affect performance…or the experience of the user.…Using a deep watch really saves you a lot of code…that had to be written if you would…do it in any other way.…Deep watch is a feature that angular…developers used to use heavily when…angular had just started.…Leaving us today with legacy code…that has usages of these watches.…That is why it is a feature we must…understand deeply when dealing…with a mature angular app.…
This advanced AngularJS course helps you explore the connected worlds of $scope and the digest cycle. Instructor Iftach Bar explains scope and inheritance, goes behind the scenes of the digest loop, and teaches both manual and automatic data binding approaches. Plus, learn how to integrate external libraries, diagnose performance issues, and debug your applications.
- $scope and controllers
- $scope built-in variables and methods
- $scope prototype inheritance
- Manual data binding with $scope.$watch
- The digest loop
- Get the $scope in the console
- Forcing $digest
Skill Level Advanced
AngularJS 1: Building a Data-Driven Appwith Ray Villalobos2h 15m Intermediate
1. Scope Basics
2. Manual Data Bindings
3. The Digest Loop
4. Tips for Debugging Angular in the Console
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.