Skip to content

Commit

Permalink
Adding a second pagination view to recipe list
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlynch committed Oct 3, 2017
1 parent dda6634 commit c64c0d4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
7 changes: 7 additions & 0 deletions app/views/pagination.html
@@ -0,0 +1,7 @@
<div class="pull-right btn-group">
<a ng-repeat="page in recipes | filter:categoryFilterFn | pageCount:pageSize"
ng-click="selectPage($index + 1)" class="btn btn-default"
ng-class="getPageClass($index + 1)">
{{ $index + 1 }}
</a>
</div>
11 changes: 4 additions & 7 deletions app/views/recipeList.html
Expand Up @@ -12,6 +12,9 @@
</div>
</div>
<p>&nbsp;</p>
<ng-include src="'views/pagination.html'"></ng-include>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="container recipes">
<div
class="well"
Expand All @@ -34,12 +37,6 @@ <h2>
</div>
</div>
</div>
<div class="pull-right btn-group">
<a ng-repeat="page in recipes | filter:categoryFilterFn | pageCount:pageSize"
ng-click="selectPage($index + 1)" class="btn btn-default"
ng-class="getPageClass($index + 1)">
{{ $index + 1 }}
</a>
</div>
</div>
<ng-include src="'views/pagination.html'"></ng-include>
</div>

0 comments on commit c64c0d4

Please sign in to comment.