angularjs 服务

内置服务

1、$timeout

2、$watch(obj,fun):

fun(newVal,oldVal,scope) //newVal是新改变的值,oldVal是旧值

3、$destroy():作用域的销毁,如果子作用域不再有用了。那么子作用域的创建者就会负责用$destroy()来将它销毁。这回停止$digest再调用子作用域,并且让作用域占用的内容能够被回收。

 

 

内置函数:

1、dateFilter(time,format)//参数time是时间,format是格式化

posted @ 2014-07-10 17:54  嘣嘣  阅读(152)  评论(0编辑  收藏  举报