2017-11-16 14:21:57 +01:00
|
|
|
import { Component, OnInit } from '@angular/core';
|
2017-11-22 13:25:01 +01:00
|
|
|
import { Router, ActivatedRoute, ParamMap, Params } from '@angular/router';
|
|
|
|
import {Location} from '@angular/common';
|
|
|
|
import { ServerService } from '../../../app/services/server.service';
|
2017-11-16 14:21:57 +01:00
|
|
|
@Component({
|
2017-11-16 15:16:09 +01:00
|
|
|
selector: 'dmp-detailed',
|
2017-11-16 14:21:57 +01:00
|
|
|
templateUrl: './dmp-detailed.component.html',
|
|
|
|
styleUrls: ['./dmp-detailed.component.css']
|
|
|
|
})
|
|
|
|
export class DmpDetailedComponent implements OnInit {
|
|
|
|
|
2017-11-22 13:25:01 +01:00
|
|
|
constructor(private serverService: ServerService, private router: Router, private _location: Location, private route: ActivatedRoute) {
|
2017-11-16 18:07:27 +01:00
|
|
|
|
|
|
|
}
|
2017-11-16 14:21:57 +01:00
|
|
|
|
2017-11-22 13:25:01 +01:00
|
|
|
dmp : any;
|
|
|
|
|
|
|
|
|
2017-11-16 14:21:57 +01:00
|
|
|
ngOnInit() {
|
2017-11-16 18:07:27 +01:00
|
|
|
|
2017-11-22 13:25:01 +01:00
|
|
|
let sub = this.route.queryParams.subscribe(params => {
|
|
|
|
|
|
|
|
let dmpid = params.dmpid;
|
|
|
|
this.serverService.getDmp(dmpid).subscribe(
|
|
|
|
response => {
|
|
|
|
this.dmp = response;
|
|
|
|
debugger;
|
|
|
|
},
|
|
|
|
error => {
|
|
|
|
console.log("Could not load dmp");
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-11-16 14:21:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|