From 114571e3a34fa1e0916b9239339471777321cc1a Mon Sep 17 00:00:00 2001 From: jesus-dayo Date: Thu, 11 Aug 2016 09:44:32 +0800 Subject: [PATCH] Fix pagination --- .../StudentDirectory/src/main/resources/application.properties | 2 +- .../StudentDirectory/src/main/webapp/view/app.js | 1 + .../test/java/org/baeldung/web/service/StudentServiceTest.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-rest-angular-pagination/StudentDirectory/src/main/resources/application.properties b/spring-rest-angular-pagination/StudentDirectory/src/main/resources/application.properties index a9bf6ca218..e42588cee0 100644 --- a/spring-rest-angular-pagination/StudentDirectory/src/main/resources/application.properties +++ b/spring-rest-angular-pagination/StudentDirectory/src/main/resources/application.properties @@ -1 +1 @@ -server.contextPath=/StudentDirectory \ No newline at end of file +server.contextPath=/ \ No newline at end of file diff --git a/spring-rest-angular-pagination/StudentDirectory/src/main/webapp/view/app.js b/spring-rest-angular-pagination/StudentDirectory/src/main/webapp/view/app.js index 522c49c8cb..715b667cc9 100644 --- a/spring-rest-angular-pagination/StudentDirectory/src/main/webapp/view/app.js +++ b/spring-rest-angular-pagination/StudentDirectory/src/main/webapp/view/app.js @@ -17,6 +17,7 @@ app.controller('StudentCtrl', ['$scope','StudentService', function ($scope,Stude paginationPageSizes: [5, 10, 20], paginationPageSize: paginationOptions.pageSize, enableColumnMenus:false, + useExternalPagination: true, columnDefs: [ { name: 'studentId' }, { name: 'name' }, diff --git a/spring-rest-angular-pagination/StudentDirectory/src/test/java/org/baeldung/web/service/StudentServiceTest.java b/spring-rest-angular-pagination/StudentDirectory/src/test/java/org/baeldung/web/service/StudentServiceTest.java index 3e476bf0d0..c6c9539abd 100644 --- a/spring-rest-angular-pagination/StudentDirectory/src/test/java/org/baeldung/web/service/StudentServiceTest.java +++ b/spring-rest-angular-pagination/StudentDirectory/src/test/java/org/baeldung/web/service/StudentServiceTest.java @@ -22,7 +22,7 @@ import io.restassured.response.Response; public class StudentServiceTest{ private String getURL() { - return "/StudentDirectory/student/get"; + return "/student/get"; } @Test