The tabular views make heavy use of Angular directives, to keep the source code concise. However, it can be tricky to understand what all those non-standard-HTML attributes are for. This page sheds some light on the mystery. In addition, further configuration options / variants are described.
Notes on Directives
icon icon-id="refresh" icon-size="36"
Notes on Main Table
Note that the table view makes use of two HTML <table> elements; the first for the (non-scrolling) table headers, and the second for the (scrolling) table contents:
Table Column Options
The first thing to note about the table columns is that the column headers use td tags (not th tags).
Columns may be labeled, or have no label at all (e.g. for columns with icons). The following table lists the possible options to be applied to a column:
|attribute col-width with pixel value||Sets column to that specific width in pixels|
|class||Sets column width to a good size for icons|
|attribute colId with value||Used to identify columns for sorting in ascending or descending order|
|attribute without value||Allows that column to be sortable|
See the following code snippet for an example:
A typical table body might look something like this:
The first <tr> element is made visible only if there are no rows of table data.
The second <tr> element is a pattern that is used repeatedly by Angular to create a row for every element in the tableData variable (defined on our controller scope). Note the icon column <td> is classed with "table-icon" so that it is sized correctly.
Table Row Options
If you wish to create a table where one item spans multiple rows, you can specify your data <tr> elements to look something like this:
Note the use of the ng-repeat-start directive in the first row, and the ng-repeat-end directive in the last.