Please enable Javascript to correctly display the contents on Dot Net Tricks!


Posted On : 05 Feb 2015
Updated On : 10 Feb 2015
Total Views : 3226

The $scope object used by views in AngularJS are organized into a hierarchy. There is a root scope, and the $rootScope can has one or more child scopes. Each controller has its own $scope (which is a child of the $rootScope), so whatever variables you create on $scope within controller, these variables are accessible by the view based on this controller.

Scope Inheritance Example

AngularJS Inheritance

What do you think?

I hope you will enjoy the AngularJS scope hierarchy while developing your app with AngularJS. I would like to have feedback from my blog readers. Your valuable feedback, question, or comments about this article are always welcome.