项目作者: cesardmoro

项目描述 :
Table Column Toggler
高级语言: JavaScript
项目地址: git://github.com/cesardmoro/tableColumnToggler.git
创建时间: 2017-03-28T20:41:48Z
项目社区:https://github.com/cesardmoro/tableColumnToggler

开源协议:MIT License

下载


Table Column Toggler

Is a angular directive for toggle columms on a table:

Getting started:

Example:

  1. <table-column-toggler-control></table-column-toggler-control> //this autogenerates a control for the table columns with bootstrap dropdown
  2. <table class="registros" table-column-toggler-table> //this is main directive add this to your table
  3. <thead>
  4. <tr>
  5. <th hide><a href="javascript:" >DNI</a></th> //this will be hidden by default
  6. <th hide><a href="javascript:" >Genero</a></th>
  7. <th><a href="javascript:" >Apellido</a></th>
  8. <th><a href="javascript:" >Nombre</a></th>
  9. <th><a href="javascript:" >nombres</a></th>
  10. <th ignore></th> //this will be ignored (not added to control)
  11. </tr>
  12. </thead>
  13. <tbody>
  14. <!-- | orderBy: 'nombrelista' -->
  15. <tr ng-repeat="item in items " ng-if="items" table-column-toggler-repeat> //add this to ng-repeat
  16. <td ng-bind="item.dni"></td>
  17. <td ng-bind="item.genero"></td>
  18. <td ng-bind="item.apellido"></td>
  19. <td ng-bind="item.campo"></td>
  20. <td ng-bind="item.campo"></td>
  21. <td>
  22. <button></button>
  23. </td>
  24. </tr>
  25. </tbody>
  26. </table>
  27. </code>