角度中使用的 $$(双美元符号)是什么? [英] What is the $$ (double dollar sign) used for in angular?
本文介绍了角度中使用的 $$(双美元符号)是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在查看 angular 1.2 源代码,我只是好奇为什么有些函数以两个美元符号为前缀.这是某种约定吗?
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?
推荐答案
- 单个
$
用于保留的公共标识符 - 双
$$
用于保留的私有标识符 - Single
$
for reserved, public identifiers - Double
$$
for reserved private identifiers
引用文档:
$ 前缀命名约定
...
如果您检查 Scope,您可能还会注意到一些以 $$ 开头的属性.这些属性被认为是私有的,不应被访问或修改.
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.
这篇关于角度中使用的 $$(双美元符号)是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文