Reputation: 372
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
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