0

I cannot find any documentation regarding the proper use of $ in scope variables. My code runs fine without them and the closest answer google gave was that it is a convention used by JQuery programmers.What are the best practices and when should it be used in Angular?

1 Answer 1

3

You can find more details in here: http://docs.angularjs.org/guide/concepts#angular_namespace

Angular Namespace To prevent accidental name collision, Angular prefixes names of objects which could potentially collide with $. Please do not use the $ prefix in your code as it may accidentally collide with Angular code.

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

Comments

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.