- add platform-detail.component
- remove helgoland modules depiction and selector and angular/forms
This commit is contained in:
parent
e797122055
commit
7f13e31251
13 changed files with 174 additions and 1145 deletions
|
@ -0,0 +1,43 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Location } from '@angular/common';
|
||||
import { GeomonPlatform } from '../../../shared/models/platform';
|
||||
import { DatasetApiService } from '../../services/dataset-api.service';
|
||||
|
||||
// import { Hero } from '../hero';
|
||||
// import { HeroService } from '../hero.service';
|
||||
|
||||
@Component({
|
||||
selector: 'geomon-platform-detail',
|
||||
templateUrl: './platform-detail.component.html',
|
||||
styleUrls: ['./platform-detail.component.scss']
|
||||
})
|
||||
export class PlatformDetailComponent implements OnInit {
|
||||
|
||||
platform: GeomonPlatform;
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private datasetService: DatasetApiService,
|
||||
private location: Location
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.getHero();
|
||||
}
|
||||
|
||||
getHero(): void {
|
||||
const id = String(this.route.snapshot.paramMap.get('id'));
|
||||
this.datasetService.getPlatform(id, 'https://geomon.geologie.ac.at/52n-sos-webapp/api/')
|
||||
.subscribe((platform) => {
|
||||
this.platform = platform;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
goBack(): void {
|
||||
this.location.back();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue