AngularJs中,如何在数据加载完成后,执行Js脚本
1、自定义服务 app . directive ( 'onFinishRenderFilters' , function ( $timeout ) { return { restrict: 'A' , link : function ( scope , element , attr ) { if ( scope . $last === true ) { $timeout ( function () { scope . $emit ( 'ngRepeatFinished' ); }); } } }; }); < tbody > < tr ng-repeat = "item in itemArr" on-finish-render-filters > < td ng-bind = " item .title" ></ td > < td ng-bind = " item. noticetype" ></ td > < td ng-bind = " item .district" ></ td > < td ng-bind = " item .createTime" ></ td > < td ng-bind = " item .createDepartment" ></ td > < td ng-bind = " item .createUserName" ></ td > </ tr