I am loading my items into table with multiple rows and multiple td. I have used partition custom filter from this link
This is my FIDDLE
myApp.filter('partition', function() {
var cache = {};
var filter = function(arr, size) {
if (!arr) { return; }
var newArr = [];
if(size>arr.length)
size=arr.length;
for (var i=0; i<arr.length; i+=size) {
newArr.push(arr.slice(i, i+size));
}
var arrString = JSON.stringify(arr);
var fromCache = cache[arrString+size];
if (JSON.stringify(fromCache) === JSON.stringify(newArr)) {
return fromCache;
}
cache[arrString+size] = newArr;
return newArr;
};
return filter;
});
When I give more that 4 elements its working properly. But when I provide only single product that td is occupying whole tr. I just want to have that td occupying its allocated space so that border looks good. If anybody can find workaround, Please help.