Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some pagination functionality #10

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

djds23
Copy link
Contributor

@djds23 djds23 commented Mar 26, 2014

buttons!

@@ -11,6 +11,19 @@ app.config(['$routeProvider', function($routeProvider) {

app.controller('MessageListCtrl', ['$scope', '$http', '$location', function($scope, $http, $location) {
$scope.searchQuery = $location.search().q || '';
$scope.page_num = 1;
$scope.older = function() {
if ($scope.page_num != $scope.total_pages) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's usually better to use !== than !=.

!= changed to !==
</tr>
</table>
<button ng-click="last_page()">Last Page</button>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be "Previous Page" or something similar rather than "Last Page". Otherwise, the meaning is ambiguous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants