AngularJS and its use of Dollar Variables

It is just a naming convention from the below snippet
http://docs.angularjs.org/tutorial/step_05

‘$’ Prefix Naming Convention
You can create your own services, and in
fact we will do exactly that in step 11. As a naming convention,
angular’s built-in services, Scope methods and a few other angular
APIs have a ‘$’ prefix in front of the name. Don’t use a ‘$’ prefix
when naming your services and models, in order to avoid any possible
naming collisions.

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.

Leave a Comment