Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meaning of $$ in angular [duplicate]

If $ represents built-in service in Angular, what does this $$ prefix mean ? I was just inspecting the scope in Console and saw $$watchers, $$listeners etc

like image 244
mallaudin Avatar asked Dec 19 '25 08:12

mallaudin


1 Answers

$$ prefix variable are treated as private variable, the reason behind adding $$ before the variable name is, that will avoid the internal variable conflicts and they wouldn't be exposed for external use.

Like in angular you could find many of them, $$observers, $$watchers, $$childHead, $$childTail, $$ChildScope, etc.

like image 108
Pankaj Parkar Avatar answered Dec 22 '25 04:12

Pankaj Parkar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!