如何获得角UI电网footerTemplate工作? [英] How to get angular ui grid footerTemplate to work?

查看:242
本文介绍了如何获得角UI电网footerTemplate工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

角UI-电网有一个名为footerTemplate属性,它应该提供创建自定义页脚模板的可能性。
我试图进入一个字符串的HTML内容(有一些文字的div),我也试着字符串和渲染DIV甚至在ID添加一个.html文件名,但他们都不工作。
它也不清楚对我是否需要启用showGridFooter这个或没有,所以我都试过,但footerTemplate或者不显示在所有的,或者如果我设置showGridFooter为真,则显示默认页脚(共线在网格)。
缺少什么我在这里?

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?

推荐答案

有关角UI电网3.0.x的它正在与下面的例子选项:

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

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

有关2.x的NG-电网版本,Mokgra的版本还是不错的。

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

这篇关于如何获得角UI电网footerTemplate工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆