Angular ui-grid filter settings, angularui-grid
The angular ui-grid filter settings need to be reviewed recently and sent to the essay by the way.
Var app = angular. module ('app', ['ui. grid ', 'ui. grid. edit']); app. controller ('mainctrl ', [' $ scope ',' $ http', function ($ scope, $ http) {$ scope. gridOptions = {columnDefs: [{field: 'name'}, {field: 'amount', name: 'number', cellFilter: 'fractionfilter'}, {field: 'amount ', name: 'currency', cellFilter: 'currencyfilter: this '}]}; $ http. get ('data. json '). success (function (data) {$ scope. gridOpt Ions. data = data ;}) ;}]). filter ('fractionfilter', function () {return function (value) {return value. toFixed (0 );};}). filter ('currencyfilter', function () {var currencyMap = {'dollar ':' $ ', 'Pound': '£', 'euro ':'? '}; Return function (value, scope) {return currencyMap [scope. row. entity. currency] + value. toFixed (2 );};})
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.