AngularJS 中的固定标题表 [英] Fixed header table in AngularJS
问题描述
我遇到了一个涉及固定标题表的问题.我正在使用 AngularJS &用于构建 Web 应用程序的 Bootstrap.我不能使用 ng-grid
因为它不支持 IE7.所以,我通过 ng-repeat
填充表格行.该应用程序响应.所以,我不能为单元格/标题提供固定宽度.有什么简单的方法可以修复表头吗?
I'm stuck on a problem involving a fixed header table. I'm using AngularJS & Bootstrap to build a web application. I can't use ng-grid
as it doesn't support IE7. So, I'm populating the table rows by ng-repeat
. The application is responsive. So, I can't give fixed width to the cells/headers. Is there any simple way to have the table headers fixed?
提前致谢.
推荐答案
我最近为此创建了一个指令,您可以使用 bower 安装它:
I created a directive for this recently, you can install it using bower:
bower install angu-fixed-header-table
有关更多详细信息和工作示例,您可以在 http://pointblankdevelopment.com.au/blog/angularjs-fixed-header-scrollable-table-directive
For more details and a working example you can see my blog post at http://pointblankdevelopment.com.au/blog/angularjs-fixed-header-scrollable-table-directive
这篇关于AngularJS 中的固定标题表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!