AngularJS Scope Methods

AngularJS scope is an object treated as application model and execution context for expressions. Scopes are arranged in hierarchical structure which mimics the DOM structure.

Scope characteristics

  • Scopes object provides APIs like $watch, $watchgroup, $watchCollection etc to observe model changes.
  • $watch method is used for watching single scope properties.
  • $watchCollection() method is used for watching a scope property of collection in nature like Array.
  • $watchGroup() method is used for watching a group of scope properties in AngularJS application.

AngularJS Scope Methods

Here is a list of AngularJS Scope Methods with description.

MethodDescription
$watchThis method is used to watch value changes in scope properties or variables.
$watchGroupThis method is used to watch value in scope array variable.
$watchCollectionThis method is used to observe properties on a single object.
$onThis method is used to listens dispatched events of a given type
$emitThis method is used to dispatches an event name upwards and travel up to $rootScope.scope listeners.
$broadcastThis method is used to dispatches an event name downward to all child scopes notify the registered $rootScope listeners.
$newThis scope object method creates a new child scope.
$digestThis scope method processes all of the watchers of the current scope and its children.
$evalThis scope method is used to executes the expression on the current scope and returns the result.
$applyThis scope method is used to execute an expression in angular from outside of the angular framework.

See Also

AngularJS Built-in Filters
AngularJS Built-in Directives
AngularJS Expression
AngularJS Built-in Events
AngularJS Scope Methods
AngularJS Built-in Services
AngularJS Controller Inheritance
AngularJS Custom Directives


 
SHARE THIS IF YOU LIKE!
submit to reddit

SUBSCRIBE FOR LATEST UPDATES
HAVE WE CONNECTED ON FACEBOOK?
TOP TUTORIALSTOP CODE EXAMPLESTOP LIVE DEMOLINKSSTAY CONNECTED
HTML Tutorial
HTML5 Tutorial
Bootstrap3 Tutorial
Javascript Tutorial
TypeScript Tutorial
AngularJS Tutorial
CSharp Tutorial
PHP Tutorial
Developer Tools
Javascript
AngularJS
Google MAP API V3
ASP.NET
Javascript
AngularJS
Google MAP API V3
Contact Us
Advertise with Us
Privacy Policy
Disclaimer
Stay connected. We actually like you. If you want to get up to the minute updates, then connect with us on your fav below.
 
Twitter   Linkedin   Facebook   Google+    RSS   Pinterest
 
Protected by Copyscape Original Content Checker
 
 
Copyright ©2017 www.techstrikers.com Unauthorized reproduction/replication of any part of this site is prohibited.