Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Byron Farrell
5,700 PointsWhat is the purpose of the dollar sign before the variable scope i.e. $scope?
What does the $ sign as the first character of a variable mean?

Byron Farrell
5,700 PointsHey Dave,
I only asked because I am doing the angular tutorial and a parameter was named $scope and I just thought it was a special icon for a special type of variable. Thanks for replying :)

Dave StSomeWhere
19,870 PointsAha, that's why I asked about context.
Looks like the angular peeps use do use it - some searching should help you see what and why they use it - I'm not up on angular so will stop babbling now
1 Answer

Sean T. Unwin
28,690 PointsWords prefaced with a dollar sign ($) in Angular are custom objects within the Angular engine ,similarly to jQuery where $()
is reference to a jQuery Object, which in turn typically references a DOM element.
Info on Scopes in Angular:
Angular: What are $scope
's
Dave StSomeWhere
19,870 PointsDave StSomeWhere
19,870 PointsIn what context?
Some people use it to convey a meaning but as far as JavaScript is concerned it is just another valid identifier.
From MDN Identifier