AngularJS: Scope and Digest
1h 44mAdvanced2017-08-03
Authors

Iftach Bar
CTO with 15 years of software and hi-tech industry experience
Course details
Scope is at the heart of the AngularJS data-binding story, weaving together the controller (JavaScript) and the view (HTML) of a web application. The digest cycle is the scope's monitor, which watches for changes and updates the view. The way you edit the scope and call the digest cycle—using functions such as $watch(), $digest(), and $apply()—can make a huge difference in the reliability and performance of large applications. Companies are looking for AngularJS developers who can understand, execute, and troubleshoot these functions.
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.
Learning objectives
$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
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.
Learning objectives
$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
Skills covered
AngularJavaScript FrameworksWeb DevelopmentOpen SourceDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - Welcome
- 02 - What you should know
- 03 - Using the exercise files
1. Scope Basics
- 04 - Initializing an app and a controller
- 05 - Angular data bindings and usage
- 06 - $scope and controllers
- 07 - $scope built-in variables and methods
- 08 - $scope prototype inheritance
- 09 - Use controllerAs syntax
- 10 - controllerAs naming conventions
- 11 - The built-in directives problem
- 12 - $rootScope
2. Manual Data Bindings
- 13 - $scope.$watch
- 14 - $watch function expressions
- 15 - How bindings work
- 16 - deep $watch
- 17 - How deep $watch works
- 18 - Destroying a $watch
3. The Digest Loop
- 19 - Basic digest
- 20 - When does Angular call the digest loop
- 21 - Dive into a digest loop
- 22 - Infinite digest loops
- 23 - When the digest loop is not called
- 24 - Integrate an external library
- 25 - $apply vs. $digest
4. Tips for Debugging Angular in the Console
- 26 - Get the $scope in the console
- 27 - Force $digest
- 28 - Measure the Angular $digest loop time
- 29 - How to use ng-stats
- 30 - Inject services to the console
Conclusion
- 31 - Next steps