今天学到一种新的过滤器方法cellFilter
var app
= angular
.module('typeList', ['ngGrid']);
app
.controller('typeListCtrl',function() {
$scope
.gridOptions
= {
......
columnDefs
: [
{ field
: 'createtime',displayName
: '创建时间',cellFilter
:"dataFilter", width
:110},
]
};
})
.filter("dataFilter",function(){
return function(val
){
return val
.slice(0,10);
};
});
转载请注明原文地址:https://tech.qufami.com/read-9549.html