什么是角的无证特点? [英] What are the undocumented features of Angular?
本文介绍了什么是角的无证特点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
该角文档中缺少了一些东西。有人可以总结无证的功能是什么?
解决方案
角1.0.5和1.0.4:
- 范围有两个有用的无证特性:
- NG-开关有一个无证
更改
参数,它接受一个前pression(例如plnkr ) - 选择有一个无证
NG-变化
接受一个前pression参数 - 属性有一个无证
$观察
方法(虽然它是在指令页提到) - $ cacheFactory 有两个无证方法(的例如小提琴)
-
的get()
-
信息()
-
- 地点服务有两个无证事件
-
$ locationChangeStart(EVT,NEWURL,OLDURL)
(例如) -
$ locationChangeSuccess(EVT,NEWURL,OLDURL)
(见<一href=\"http://stackoverflow.com/questions/15006849/angularjs-whats-the-difference-between-locationchangesuccess-and-locationch\">Angularjs - 什么是$ locationChangeSuccess和$ locationChangeStart ) 之间的区别?
-
- 使用NG-值(无证)与
输入类型=电台
,看到的在API文档Disqus评论
The Angular documentation is missing a few things. Can someone summarize what the undocumented features are?
解决方案
Angular 1.0.5 and 1.0.4:
- 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
- ng-switch has an undocumented
change
parameter that accepts an expression (example plnkr) - select has an undocumented
ng-change
parameter that accepts an expression - Attributes has an undocumented
$observe
method (although it is mentioned on the Directives page) - $cacheFactory has two undocumented methods (example fiddle)
get()
info()
- the $location service has two undocumented events
$locationChangeStart(evt, newUrl, oldUrl)
(example)$locationChangeSuccess(evt, newUrl, oldUrl)
(see also Angularjs - what's the difference between $locationChangeSuccess and $locationChangeStart?)
- use ng-value (undocumented) with
input type="radio"
, see Disqus comment in API docs
这篇关于什么是角的无证特点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文