ng-repeat执行完成之后操作方法

来源:互联网 发布:union摄影软件安卓版 编辑:程序博客网 时间:2024/05/22 10:38
1./*自定义指令用于循环完事之后,触发一个点击事件,*/
.directive('repeatDone',function() {
return{
link:function(scope, element, attrs) {
if(scope.$last) {// 这个判断意味着最后一个 OK
scope.$eval(attrs.repeatDone)// 执行绑定的表达式
}
}
}
2.
.
3.3