Footer expressions

aggregate functions in footer

Total users:{{$filtered.length}} Total balance:{{ $owner.getTotalBalance($filtered) }} $
{{::item.name}} {{::item.age}} {{item.money}}

Please try to edit money column

In template:

Notice:

variable $filtered contains displayed array (It depends on the filters like search or your custom filters);

If you want to apply your aggregate function for all data array despite filters, please use getTotalBalance(data). In this case returned of function value won't be changed during search.

Notice:

The <tfoot> tag must be used in the following context: As a child of a <table> element, after any <caption>, <colgroup>, and <thead> elements and before any <tbody> and <tr> elements.

Method getTotalBalance in controller: