什么是角用于$$(双美元符号)? [英] What is the $$ (double dollar sign) used for in angular?
本文介绍了什么是角用于$$(双美元符号)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在看角1.2源$ C $ C,而我只是好奇,为什么一些功能与两个美元符号pfixed $ P $。这是某种约定?
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
要引用文档:
$ preFIX命名约定
$ 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.
这篇关于什么是角用于$$(双美元符号)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文