Previously, I need to review the settings of angular ui-grid filters recently, so I posted it to the essay.
var app = ('app', ['', '']); ('MainCtrl', ['$scope', '$http', function ($scope, $http) { $ = { columnDefs: [ { field: 'name' }, { field: 'amount', name: 'Number', cellFilter: 'fractionFilter' }, { field: 'amount', name: 'Currency', cellFilter: 'currencyFilter:this' } ] }; $('') .success(function (data) { $ = data; }); }]) .filter('fractionFilter', function () { return function (value) { return (0); }; }) .filter('currencyFilter', function () { var currencyMap = { 'dollar': '$', 'pound': '£', 'euro': '€' }; return function (value, scope) { return currencyMap[] + (2); }; })
The above is all the content of this article. I hope it will be helpful to everyone's study and I hope everyone will support me more.