I have four table headers:
$scope.headers = [\"Header1\", \"Header2\", \"Header3\", \"Header4\"];
And I want to be able to sort my table by
Use a third-party JavaScript library. It will give you that and much more. A good example is datatables (if you are also using jQuery): https://datatables.net
Or just order your bound array in $scope.results when the header is clicked.