python ruby-programming-language Smalltalk Vue.js Knockoutjs TypeScript JavaScript, OOPs JavaScript Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 4 Angular 2 AngularJs 1.x NodeJs Perl Programming R Programming RequireJs Rust Programming Backbonejs closure programming language go-programming-language kotlin-programming-language
How does data binding work in AngularJs framework?

How does data-binding work in AngularJs framework?

This is my basic overview over data-binding in AngularJs.  

The AngularJs remembers the values and it always compare to the previous values. If find any changes in the value it automatically fire the change event. That is also called dirty checking.

The HTML tells the AngularJs compiler to create the $watch for controller methods and its run inside the $apply method.

The Angular create the $watch internally. 

The watch means that angular watches the changes in the variable on the $scope object. 

The watches are created using the $scope.$watch() method and the $ method creates a watch of some variables.

When you register a watch you need to pass two functions. i.e.

·         One is value function.
·         And other is listener function.

Try the new Angular 2 and Run the live example


Hi there! Welcome to my blog. My name is Anil Singh. I'm a author of this blog. For more detail about me, kindly refer to this link..
My Blogs - and
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like Powered by Blogger.
ASK Questions