0

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.

2

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

ohh that's why i dont see any of it talking in the internet, thanks mate :)
As a beginner there are far more important things to learn about e.g. angular2 or react :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.