Wednesday, 21 March, 2018 UTC


Summary

  • Model (which contains application data for the View) So, Scope is a JavaScript object which is available in both  View and Controller.
  • We have seen in the previous article that AngularJS applications have data model which is a collection of data for the application view and a View is our HTML which displays the data.
  • Below are the examples of the one way data binding: Bind model value with html element using data binding but if we change that html element it will not update value in model, it is one way binding and not synchronization between model and view.
  • Two way data binding is the synchronization process between model and view in angular JS applications.
  • ng-model directive provides the two way data binding between the model and the view in the angular JS application.
Angular, Scope in AngularJS
@ngnewsletter: Angular From Basic To Expert – Day Four
In the previous articles of AngularJS from basic to expert Day One, Day Two and Day Three, we have learned what AngularJS is, and we have seen some basics of AngularJS and directives in Angular and seen the main concepts in Angular.js such as – module, model, and controller and used them in our AngularJS demo application.
You can check those articles here.
In this article, we will learn,
So, I will explore them one by one and also will continue with our AngularJS demo application which we have used in the previous articles.
Scope is an object injected into the application but it is more than an object, which represents the data and methods. Scope is the main thing or key to bind an application’s data and connect the Model to the View. Scope handles the binding part between HTML View and JavaScript (AngularJS Controller).
Model (which contains application data for the View) So, Scope is a JavaScript object which is available in both  View and Controller. Data binding is data synchronization between View and data model. We have seen in the previous article that AngularJS applications have data model which is a collection of data for the application view and a View is our HTML which displays the data. Data binding is the concept or way of data traveling in the AngularJS applications….
Angular From Basic To Expert