<!doctype html>
<html ng-app="myApp">
  <head>
    <title>Sortowanie i filtrowanie w aplikacji AngularJS</title>
    <style>table{text-align:center;}td,th{padding:3px;}</style>
  </head>
  <body>
    <div ng-controller="myController">
      <h2>Sortowanie i filtrowanie</h2>
      <input type="text" ng-model="filterString">
      <input type="button" ng-click="setFilter()" value="Filtruj">
      <table>
      <tr>
        <th ng-click="setSort('make')">Producent</th>
        <th ng-click="setSort('model')">Model</th>
        <th ng-click="setSort('mp')">Megapiksele</th>
      </tr>
      <tr ng-repeat=
          "camera in filteredCameras | orderBy:column:reverse">
        <td>{{camera.make}}</td>
        <td>{{camera.model}}</td>
        <td>{{camera.mp}}</td>
      </tr>
      </table>
    <script src="http://code.angularjs.org/1.2.9/angular.min.js"></script>
    <script src="/js/angular_filter_sort.js"></script>
  </body>
</html>