Cox Szg Cox Szg - 3 months ago 75
Javascript Question

How to get angular ui grid footerTemplate to work?

Angular UI-Grid has a property called footerTemplate, which is supposed to offer the possibility to create a custom footer template.
I tried entering html content (a div with some text) in a string, I've also tried adding a .html file name in the string and even the ID of a rendered div, but none of them seem to work.
It also wasn't clear for me if I need to enable showGridFooter for this or not, so I tried both, but the footerTemplate is either not shown at all, or if I set showGridFooter to true, it shows the default footer (total lines in the grid).
What am I missing here?


For angular-ui-grid 3.0.x it's working with the following example options:

$scope.options = {
                   showGridFooter: true,
                   gridFooterTemplate: '<div>pink floyd</div>'

For the 2.x ng-grid versions, Mokgra's version is good.