Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
12
rated 0 times [  18] [ 6]  / answers: 1 / hits: 17850  / 11 Years ago, sat, october 12, 2013, 12:00:00

I'm taking a look at the angular 1.2 source code, and I'm just curious why some functions are prefixed with the two dollar signs. Is this some sort of convention?


More From » angularjs

 Answers
23

  • Single $ for reserved, public identifiers

  • Double $$ for reserved private identifiers



To quote the docs:




$ Prefix Naming Convention



...



If you inspect a Scope, you may also notice some properties that begin with $$. These properties are considered private, and should not be accessed or modified.



[#75031] Friday, October 11, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
andreguym

Total Points: 125
Total Questions: 112
Total Answers: 103

Location: Wallis and Futuna
Member since Tue, Mar 30, 2021
3 Years ago
;