<div ng-controller="tableController"><hr>
<input class="findButton" type="button" 
       value="Znajdź wyraz" ng-click="find()" />
<div id="sortOptions">
  <label class="tableLabel">Limit strony</label>
  <input class="tableInput" type="text" ng-model="limit" /><br>
  <label class="tableLabel">Zawiera</label>
  <input class="tableInput" type="text" ng-model="contains" /><br>
  <label class="tableLabel">Sortuj według</label>
  <select class="tableInput" ng-model="sortField" 
          ng-options="field for field in sortFields"></select>
  <input type="radio" ng-model="direction" value="asc"> Rosnąco
  <input type="radio" ng-model="direction" value="desc"> Malejąco
</div>
<hr>
<div>
  <input class="pageButton" type="button" value="Poprz." 
         ng-click="prev()" />
  <input class="pageButton" type="button" value="Nast." 
         ng-click="next()" />
  <label class="tableLabel">Wyrazy {{skip+1}} do {{skipEnd}}</label>
  <hr>
  <div id="tableContainer">
    <table>
      <tr><th>Wyraz</th><th>Pierwsza</th><th>Ostatnia</th><th>Długość</th>
      <th>Samogłoski</th><th>Spółgłoski</th></tr>
      <tr ng-repeat="word in words">
        <td>{{word.word}}</td>
        <td>{{word.first}}</td>
        <td>{{word.last}}</td>
        <td>{{word.size}}</td>
        <td>{{word.stats.vowels}}</td>
        <td>{{word.stats.consonants}}</td>
      </tr>
    </table>
  </div>
</div>
</div>