In this video Iftach Bar implements the Angular data binding with code to explain how the bindings in Angular work behind the scenes.
- [Instructor] To understand how angular bindings work,…I'm going to implement my own version of bindings…that is almost identical to what angular…is doing behind the scenes.…I'm going to write some code, that it's concept…is similar to the code of the built in ng-bind directive.…I'll first add a div and add an ng-bind directive to it.…Ng-bind is very similar to the double curly braces syntax.…To bind the content of the div to vm.force,…I'll just write vm.force as the value of the ng-bind.…
Let's look back at the app, and see whenever I change…the value of vm.force the value of the div changes as well.…Now I will create a new div,…and bind its text to the…value of vm.force without using ng-bind.…So let's add the div and I'm going to add an id…to the div just to be able to…find it easily from my code later.…Let's give it the id "bindme".…And now to bind the value of vm force to this div…I am going to go back to my up.js file…and I'm going to change this watch expression…to watch the value of vm.force again.…
And now in the listener function,…
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.