define(['custom/bootstrapApp'],function(app){
app.filter('getTabWidth',function(){
return function(arg,index,arr,widFn){
if(index&&arr){
if(index==(arr.length-1)){
console.log('表格寬度獲取成功');
widFn&&widFn();
}
}
return arg;
}
})
})
使用方法:
<tr ng-repeat="x in data track by $index"> <td width="100"><span ng-bind="(x | getTabWidth:$index:data:getTabWidth).dataDate">日期</span></td></tr>