diff --git a/dmp-frontend/src/app/app-routing.module.ts b/dmp-frontend/src/app/app-routing.module.ts
index af24b0197..6bb89a47e 100644
--- a/dmp-frontend/src/app/app-routing.module.ts
+++ b/dmp-frontend/src/app/app-routing.module.ts
@@ -17,7 +17,9 @@ const appRoutes: Routes = [
@NgModule({
imports: [
RouterModule.forRoot(
- appRoutes)
+ appRoutes
+ // { enableTracing: true } // <-- debugging purposes only
+ )
],
exports: [
RouterModule
diff --git a/dmp-frontend/src/app/form/dynamic-form.component.html b/dmp-frontend/src/app/form/dynamic-form.component.html
index 45f1f29b9..da0ce1c4c 100644
--- a/dmp-frontend/src/app/form/dynamic-form.component.html
+++ b/dmp-frontend/src/app/form/dynamic-form.component.html
@@ -48,24 +48,22 @@
-
Angular 2 - Pagination Example with logic like Google
-
diff --git a/dmp-frontend/src/app/form/dynamic-form.component.ts b/dmp-frontend/src/app/form/dynamic-form.component.ts
index 89484f166..5c4654651 100644
--- a/dmp-frontend/src/app/form/dynamic-form.component.ts
+++ b/dmp-frontend/src/app/form/dynamic-form.component.ts
@@ -23,10 +23,11 @@ export class DynamicFormComponent implements OnInit {
form: FormGroup;
payLoad = '';
@Input() dirtyValues: number = 0;
-
// pagination object
@Input() pagination: any = {};
+ private fragment: string;
+
constructor(private qcs: FieldControlService, private serverService: ServerService, private dataModelService: dataModelBuilder, private router: Router,
private route: ActivatedRoute, private pagerService: PaginationService) {
this.form = this.qcs.toFormGroup(new Array(), new Array());
@@ -40,6 +41,8 @@ export class DynamicFormComponent implements OnInit {
ngOnInit() {
+ this.route.fragment.subscribe(fragment => { this.fragment = fragment; }); //navigate to certain section of the page
+
console.log("DynamicFormComponent.ngOnInit() -- RUNNIGN");
let id = this.route.snapshot.paramMap.get('id'); //get the project id
@@ -96,6 +99,12 @@ export class DynamicFormComponent implements OnInit {
}
+ ngAfterViewChecked(): void { //navigate to certain section of the page
+ try {
+ document.querySelector('#' + this.fragment).scrollIntoView();
+ } catch (e) { }
+ }
+
onSubmit() {
this.payLoad = JSON.stringify(this.form.value);
}
diff --git a/dmp-frontend/src/app/form/fields/dynamic-form-field.component.html b/dmp-frontend/src/app/form/fields/dynamic-form-field.component.html
index 2c02462e1..1d05e2bbf 100644
--- a/dmp-frontend/src/app/form/fields/dynamic-form-field.component.html
+++ b/dmp-frontend/src/app/form/fields/dynamic-form-field.component.html
@@ -46,7 +46,7 @@