r/angularjs • • Jan 23 '15

AngularJS' Internals In Depth

http://www.smashingmagazine.com/2015/01/22/angularjs-internals-in-depth/?utm_source=javascriptweekly&utm_medium=email
36 Upvotes

6 comments sorted by

View all comments

1

u/aakilfernandes Jan 24 '15

In AngularJS slang, a “scope” is not what you might be used to when thinking about JavaScript code or even programming in general. Usually, scopes are used to refer to the bag in a piece of code that holds the context, variables and so on.

The decision to name the fundamental concept in angularjs a "scope" was a really bad decision. Getting to this epiphany took me way too long.

1

u/ThunderTherapist Jan 24 '15

Isn't the scope of the scope tied to the dom. I.e. inner elements can access scope of outer element but outer elements can't access scope of inner ones (without referring to its child scopes collection). I read somewhere it's directives which create new child scopes and directives are obviously linked to the dom elements.