使用 Bootstrap 3 在 AngularJS 中表示网格或表格的最佳方式? [英] Best way to represent a Grid or Table in AngularJS with Bootstrap 3?

查看:22
本文介绍了使用 Bootstrap 3 在 AngularJS 中表示网格或表格的最佳方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 AngularJS 和 Bootstrap 3 创建一个应用程序.我想显示一个包含数千行的表格/网格.什么是 AngularJS & 的最佳可用控件?Bootstrap 具有排序、搜索、分页等功能.

I am creating an App with AngularJS and Bootstrap 3. I want to show a table/grid with thousands of rows. What is the best available control for AngularJS & Bootstrap with features like Sorting, Searching, Pagination etc.

推荐答案

在尝试了 ngGrid、ngTable、trNgGrid 和 Smart 之后Table,我得出的结论是Smart Table 是迄今为止最好的 AngularJS 实现——明智和引导明智.它的构建方式与您使用标准 angular 构建自己的朴素表完全相同.最重要的是,他们添加了一些指令来帮助您进行排序、过滤等.他们的方法也使扩展自己变得非常简单.他们对表格使用常规 html 标签,对行使用标准 ng-repeat,对格式使用标准引导程序,这一事实使这成为我的明显赢家.

After trying out ngGrid, ngTable, trNgGrid and Smart Table, I have come to the conclusion that Smart Table is by far the best implementation AngularJS-wise and Bootstrap-wise. It is built exactly the same way as you would build your own, naive table using standard angular. On top of that, they have added a few directives that help you do sorting, filtering etc. Their approach also makes it quite simple to extend yourself. The fact that they use the regular html tags for tables and the standard ng-repeat for the rows and standard bootstrap for formatting makes this my clear winner.

他们的 JS 代码依赖于 angular,如果你愿意,你的 html 可以依赖于 bootstrap.JS 代码总共有 4 kb,如果您想达到更小的占用空间,您甚至可以轻松地从中挑选内容.

Their JS code depends on angular and your html can depend on bootstrap if you want to. The JS code is 4 kb in total and you can even easily pick stuff out of there if you want to reach an even smaller footprint.

其他网格会让您在不同区域产生幽闭恐惧症,而 Smart Table 却给人一种开放的感觉.

Where the other grids will give you claustrophobia in different areas, Smart Table just feels open and to the point.

如果您严重依赖内联编辑和其他高级功能,例如可以使用 ngTable 更快地启动和运行.但是,您可以在 Smart Table 中轻松添加此类功能.

If you rely heavily on inline editing and other advanced features, you might get up and running quicker with ngTable for instance. However, you are free to add such features quite easily in Smart Table.

不要错过智能桌!!!

除了我自己使用之外,我与 Smart Table 没有任何关系.

I have no relation to Smart Table, except from using it myself.

这篇关于使用 Bootstrap 3 在 AngularJS 中表示网格或表格的最佳方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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