/angular-table

Html tables with sorting and pagination.

Primary LanguageCoffeeScriptMIT LicenseMIT

angular-table

Html tables with sorting and pagination.

Written in CoffeeScript.

Check out the examples for more information.

How

All you have to do in your controller is setting up a list on your $scope:

$scope.nameList = [{name: "Laura"}, {name: "Lea"}, {name: "Sara"}]

Defining a table is 100% declarative. Here's a simple example:

<table at-table list="nameList">
  <!-- the header will automatically be created according to the body definition. -->
  <thead></thead>
  <tbody>
    <tr>
      <!-- for each item in list a cell will be rendered, containing the value in attribute. -->
      <td at-implicit attribute="name"></td>
      <!-- you can still render custom cells if you need to. -->
      <td title="Custom cell">
        The name is {{item.name}}
      </td>
    </tr>
  </tbody>
</table>