本文介绍了Angular 有哪些未公开的特性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Angular 文档缺少一些东西.有人可以总结一下未记录的功能是什么吗?
The Angular documentation is missing a few things. Can someone summarize what the undocumented features are?
推荐答案
Angular 1.0.5 和 1.0.4:
- Scope 有两个有用的未记录属性:
- Scope has two useful undocumented properties:
$parent
- can be used as a hack for binding to a primitive property in a parent scope - example$$phase
- can be used to determine if a $digest is already in progress - see this SO answer
更改
接受表达式的参数(example plnkr)ng-change
接受表达式的参数$观察
方法(虽然在指令页面上有提到)立>change
parameter that accepts an expression (example plnkr)ng-change
parameter that accepts an expression$observe
method (although it is mentioned on the Directives page)get()
info()
$locationChangeStart(evt, newUrl, oldUrl)
(示例)$locationChangeSuccess(evt, newUrl, oldUrl)
(另见 $locationChangeSuccess 和 $locationChangeStart 之间有什么区别?)
$locationChangeStart(evt, newUrl, oldUrl)
(example)$locationChangeSuccess(evt, newUrl, oldUrl)
(see also What's the difference between $locationChangeSuccess and $locationChangeStart?)
input type="radio"
的 ng-value(未记录),参见 Disqus 评论在 API 文档中input type="radio"
, see Disqus comment in API docs这篇关于Angular 有哪些未公开的特性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!