typescript 如何在 Angular2 中使用数据表

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/38563204/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 03:40:57  来源:igfitidea点击:

How to use dataTables in Angular2

htmltypescriptangulardatatabledatepicker

提问by Takichiii

I am searching for a way to make my table sortable by clicking on the column names but I cannot figure it out. I tried different ways that I found on the internet like installing angular2-datable (npm install angular-data-table) and do an import {DataTableDirectives} from 'angular2-datatable/datatable'; installing easytable (npm install ng2-easy-table) but it didn't work for me. I am also looking for a datepicker that works on all the browsers but couldn't find anyone.

我正在寻找一种通过单击列名来使我的表格可排序的方法,但我无法弄清楚。我尝试了在 Internet 上找到的不同方法,例如安装 angular2-datable(npm install angular-data-table)并从“angular2-datatable/datatable”导入 {DataTableDirectives};安装easytable(npm install ng2-easy-table)但它对我不起作用。我也在寻找一个适用于所有浏览器但找不到任何人的日期选择器。

Do you guys have any suggestions? I am working with Typescript and Angular2.

大家有什么建议吗?我正在使用 Typescript 和 Angular2。

Please help!!

请帮忙!!

回答by Naveen Kumar

The best way to use prime ng grid .That makes Better Ui

使用prime ng grid的最佳方式。这使得更好的Ui

http://www.primefaces.org/primeng/#/

http://www.primefaces.org/primeng/#/

回答by tom

I am also unable to install angular-datatable because of permission denied while accessing .configdirectory. You can add using the following command: sudo chown -R : /path/to/home/directory/.config

由于访问.config目录时权限被拒绝,我也无法安装 angular-datatable 。您可以使用以下命令添加: sudo chown -R : /path/to/home/directory/.config

This will transfer ownership to user_name.Let me know,if you find other error.

这会将所有权转移给user_name。如果您发现其他错误,请告诉我。