Sorting is a breeze in smart-table, but what about when the date and amount are in string format? How can we sort them?
app.controller('basicsCtrl', ['$scope', function (scope) {scope.rowCollection = [
{firstName: 'Laurent', lastName: 'Renard', birthDate:'1987-05-21', balance: '1,20,000', email: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b4c3dcd5c0d1c2d1c6f4d3d9d5ddd89ad7dbd9">[email protected]</a>'},
{firstName: 'Blandine', lastName: 'Faivre', birthDate: '1987-04-25', balance: '2,000', email: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4f203a292d232e212b203a0f28222e2623612c2022">[email protected]</a>'},
{firstName: 'Francoise', lastName: 'Frere', birthDate: '1955-08-27', balance: '4,23,000', email: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="196b78607476777d7c7f597e74787075377a7674">[email protected]</a>'}];
}]);
I am struggling to apply the format function inside my json. It keeps throwing an error.
formatFunction: function (value, formatParameter) {
return value[0];// some function to change string to date.
}
Referencing this documentation:
Can anyone offer assistance? I'm new to this field...