1

I am new to angularJs, and am in the process of migrating an 0.9 versioned angularJs app to 1.0.5 version. I am stuck at a function named '$add' called on an array. I have searched in the docs for hours, but no use. Can anyone enlighten me regarding this? Also will be nicer to understand the significance/specialty of '$xxx' keyword usage within angular.

1

1 Answer 1

2

I believe the $add function was removed. You can replace it by the native Array push() function (they were basically the same).

Regarding the usage of $, the angularjs documentation states:

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.