cute_programmer
cute_programmer

Reputation: 372

Angularjs : How do a function scope() in angularjs/javascript works

I'm new in java script world and just learn AngularJS. I have a question about the scope() function, by the way i know how a scope works in JavaScript what bothering me is the scope() function.

I saw several codes that they attach it into an element in jQuery. I just wonder what does that function do to an element and when should i use that function. I don't see any documentation about that function in JavaScript so i hope someone can explained it to me here.

Upvotes: 0

Views: 116

Answers (1)

charlietfl
charlietfl

Reputation: 171679

It's a way to access the angular scope that an element exists in from outside of angular.

It is rarely needed and often is used as a bad practice by people that aren't comfortable working within angular itself.

As a beginner there are far more important things to learn about

Upvotes: 1

Related Questions