Book Image

Mastering AngularJS for .NET Developers

By : Mohammad Wadood Majid, Golrokh Mirzaei
Book Image

Mastering AngularJS for .NET Developers

By: Mohammad Wadood Majid, Golrokh Mirzaei

Overview of this book

<p>AngularJS is an open source framework that utilizes the Model-View-Controller architecture for client-side application development. AngularJS is referred to as the Angular framework.</p> <p>With this book, you will soon be able to build client-side data driven applications. The introduction section covers the essentials of AngularJS, covering the core concepts of AngularJS to ensure a smooth transition to the more advanced topics discussed later on.</p> <p>This book covers the development of client-side applications with AngularJS using code examples before moving on to explore how to build the ASP.NET Web API and its features using Visual Studio .NET.</p>
Table of Contents (15 chapters)
Mastering AngularJS for .NET Developers
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Understanding the scope of AngularJS


In AngularJS, scope is an object that refers to AngularJS applying the model. Scope is an execution context for an expression. AngularJS's scope objects are organized in the data structures that mimic the DOM structure of the applying model. Scopes will watch expressions and propagate events.

Scope is the glue between an application's controller and the view. Throughout the model's linking section, the directives start with the $watch expression on the scope. The $watch expression permits the directives to be notified of the property changes and then permits the directives to render the updated value to the DOM.

AngularJS's scope objects have the following characteristics:

  • AngularJS scopes offer $watch, which is an application programming interface (API) to detect model transformations.

  • AngularJS scopes deliver $apply, which is an API used to proliferate any changes made in the model via the system's inside view from the outside of the AngularJS framework...