no message
This commit is contained in:
parent
80115ed3cf
commit
00aeab6490
|
@ -15,7 +15,7 @@ import { ProjectDetailedComponent } from './viewers/project-detailed/project-det
|
|||
|
||||
const appRoutes: Routes = [
|
||||
|
||||
{ path: 'dynamic-form', component: DynamicFormComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'dynamic-form/:id', component: DynamicFormComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'dataset', component: DatasetsComponent },
|
||||
{ path: 'login', component: MainSignInComponent},
|
||||
{ path: 'projects', component: ProjectsComponent},
|
||||
|
|
|
@ -240,7 +240,7 @@ export class DatasetsComponent implements OnInit {
|
|||
}
|
||||
|
||||
describeDataset(item) {
|
||||
this.router.navigate(['/dynamic-form'], { queryParams: {id: item.profile.id, datasetId:item.id, label: item.label}});
|
||||
this.router.navigate(['/dynamic-form/'+item.id]);
|
||||
//this.ngZone.run(() => this.router.navigate(['dynamic-form', {id: item.profile.id, datasetId:item.id, label: item.label}]));
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,8 @@ export class DynamicFormComponent implements OnInit {
|
|||
|
||||
constructor(private qcs: FieldControlService, private serverService: ServerService, private router: Router, private pdfService: PDFService,
|
||||
private _location: Location, private route: ActivatedRoute, private pagerService: PaginationService, private tokenService: TokenService, private visibilityRulesService: VisibilityRulesService) {
|
||||
}
|
||||
this.datasetId = route.snapshot.params['id'];
|
||||
}
|
||||
|
||||
getSubForm(subformName) {
|
||||
return this.form.controls[subformName];
|
||||
|
@ -75,12 +76,9 @@ export class DynamicFormComponent implements OnInit {
|
|||
|
||||
|
||||
ngOnInit() {
|
||||
//this.dataModel = new JsonSerializer<DatasetModel>().fromJSONObject(new DatasetModel(), DatasetModel);
|
||||
//this.form = this.dataModel.buildForm();
|
||||
|
||||
let sub = this.route.queryParams.subscribe(params => {
|
||||
|
||||
let dmpid = params.id;
|
||||
this.datasetId = params.datasetId;
|
||||
this.serverService.getDmp(this.datasetId).subscribe(
|
||||
response => {
|
||||
this.dataModel = new JsonSerializer<DatasetModel>().fromJSONObject(response, DatasetModel);
|
||||
|
|
|
@ -4,6 +4,6 @@ export class BaseTableOfContent{
|
|||
constructor(public router: Router,public route:ActivatedRoute){}
|
||||
|
||||
scrollToId(elementId) {
|
||||
this.router.navigate([this.route.snapshot.url], { fragment: elementId });
|
||||
this.router.navigate([this.route.snapshot.url[0]+"/"+this.route.snapshot.url[1]], { fragment: elementId });
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue