parameters for dynamic form

This commit is contained in:
annampak 2017-10-30 17:35:11 +02:00
parent d3754d31c3
commit 873b204b3f
2 changed files with 7 additions and 3 deletions

View File

@ -129,7 +129,7 @@ export class DatasetsComponent implements OnInit {
}
selectDataset(item) {debugger;
this.ngZone.run(() => this.router.navigate(['dynamic-form', {id: item.profileId}]));
this.ngZone.run(() => this.router.navigate(['dynamic-form', {id: item.profileId, datasetId:item.id, datasetProperties:item.properties}]));
}
SaveNewDataset() {

View File

@ -30,7 +30,9 @@ export class DynamicFormComponent implements OnInit {
// pagination object
@Input() pagination: any = {};
id:string;
datasetId:string;
datasetProperties:string;
private fragment: string;
xml2jsonOBJ: any;
@ -52,8 +54,10 @@ export class DynamicFormComponent implements OnInit {
//let id = this.route.snapshot.paramMap.get('id'); //get the project id
let sub = this.route.params.subscribe(params => {
let sub = this.route.params.subscribe(params => {debugger;
this.id = params.id;
this.datasetId = params.datasetId;
this.datasetProperties = params.datasetProperties
});
this.serverService.getDatsetsProfile(this.id).subscribe(