From 7f4cf41c2e7c8394e040f230a563ec00e344249e Mon Sep 17 00:00:00 2001 From: annampak Date: Mon, 9 Oct 2017 16:36:29 +0300 Subject: [PATCH] Pagination --- dmp-frontend/src/app/app.module.ts | 3 +- .../src/app/form/dynamic-form.component.html | 21 +++++++++ .../src/app/form/dynamic-form.component.ts | 36 +++++++++++--- .../src/app/services/pagination.service.ts | 47 +++++++++++++++++++ 4 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 dmp-frontend/src/app/services/pagination.service.ts diff --git a/dmp-frontend/src/app/app.module.ts b/dmp-frontend/src/app/app.module.ts index d95a89b22..1c0deaccf 100644 --- a/dmp-frontend/src/app/app.module.ts +++ b/dmp-frontend/src/app/app.module.ts @@ -18,6 +18,7 @@ import { AuthGuard } from './guards/auth.guard'; import { PageNotFoundComponent } from './not-found.component'; import { TocComponent } from './form/tableOfContents/toc.component'; import { ProjectsModule } from './projects/project.module'; +import { PaginationService } from './services/pagination.service'; @NgModule({ declarations: [ @@ -40,7 +41,7 @@ import { ProjectsModule } from './projects/project.module'; AppRoutingModule ], - providers: [ServerService, dataModelBuilder, AuthGuard], + providers: [ServerService, dataModelBuilder, AuthGuard, PaginationService], bootstrap: [AppComponent] }) export class AppModule { diff --git a/dmp-frontend/src/app/form/dynamic-form.component.html b/dmp-frontend/src/app/form/dynamic-form.component.html index 6fb122208..45f1f29b9 100644 --- a/dmp-frontend/src/app/form/dynamic-form.component.html +++ b/dmp-frontend/src/app/form/dynamic-form.component.html @@ -47,7 +47,28 @@ +
+

Angular 2 - Pagination Example with logic like Google

+ + +