Skip to content

Instantly share code, notes, and snippets.

@Meshiest
Created June 16, 2016 21:53
Show Gist options
  • Save Meshiest/75a9e63921a56f7fae562581fa4bf380 to your computer and use it in GitHub Desktop.
Save Meshiest/75a9e63921a56f7fae562581fa4bf380 to your computer and use it in GitHub Desktop.
<md-table-container>
<table md-table md-row-select ng-model="selected">
<thead md-head md-order="myOrder">
<tr md-row>
<th md-column md-order-by='someAttribute'>Icon</th>
<th md-column>Foo</th>
<th md-column>URL</th>
</tr>
</thead>
<!-- you will have a theme for every single different type -->
<tbody md-body
swap-md-paint-bg="type_{{thing.type}} primary"
swap-md-paint-fg="type_{{thing.type}} foreground"
ng-repeat="thing in listOfThings | orderBy: myOrder"">
<tr
md-row
md-select="thing"
md-select-id="{{thing.id}}"
md-auto-select>
<td md-cell>
<md-icon>
{{thing.icon}}
</md-icon>
<md-tooltip>
{{thing.name}}
</md-tooltip>
</td>
<td md-cell>{{thing.bar}}</td>
<td md-cell><a ng-href='#/thing/{{thing.id}}'>{{thing.url}}</a></td>
</tr>
</tbody>
</table>
</md-table-container>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment