Skip to content

Instantly share code, notes, and snippets.

@stlsmiths
Created May 27, 2014 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stlsmiths/9430a6c0cb2e69e638e5 to your computer and use it in GitHub Desktop.
Save stlsmiths/9430a6c0cb2e69e638e5 to your computer and use it in GitHub Desktop.
template for datatable
<table class="table table-bordered table-hover table-condensed">
<thead>
<tr>
<th>- Actions -</th>
<th ng-repeat="col in cols" ng-click="columnClick(col)" data-col-index="{{$index}}" class="">{{col.key}}</th>
</tr>
</thead>
<tbody class="body-scroll">
<tr ng-repeat="row in rows | orderBy:sortCol">
<td class="center" style="min-width:175px;width:175px;">
<input type="checkbox" ng-model="row._selected" /> &nbsp;
<edit-button click="buttonClick({act:'edit',row:row,db:dbn,tbl:tbn})">Edit</edit-button>
<delete-button click="buttonClick({act:'del',row:row,db:dbn,tbl:tbn})">Delete</delete-button>
</td>
<td ng-repeat="col in cols">{{row[col.key]}}</td>
</tr>
</tbody>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment